ibex_bluesky_core.log

Bluesky specific logging configuration.

Note

logging.config.fileConfig sets the global, application-level, logging policies. ibex_bluesky_core is a library, so does not set application-level policies. Instead, handlers for our own logger and the bluesky loggers are added.

Members

file_handler

Get the file handler for ibex_bluesky_core and related loggers.

set_bluesky_log_levels

Set log level of bluesky-related loggers: ibex_bluesky_core, bluesky & ophyd_async.

setup_logging

Set up logging with a default configuration.

ibex_bluesky_core.log.file_handler() TimedRotatingFileHandler[source]

Get the file handler for ibex_bluesky_core and related loggers.

Cached so that this function does not run on import, but multiple invocations always return the same handler object.

ibex_bluesky_core.log.set_bluesky_log_levels(level: str | int | None = None) None[source]

Set log level of bluesky-related loggers: ibex_bluesky_core, bluesky & ophyd_async.

Parameters:

level – a log level string or integer, or None. If None, will set INFO level by default for loggers which have not previously been configured, but will not change log levels for already-configured loggers.

ibex_bluesky_core.log.setup_logging() None[source]

Set up logging with a default configuration.

The default configuration is to log to

c:\instrument\var\logs\bluesky

This location can be overridden using the IBEX_BLUESKY_CORE_LOGS environment variable.

Loggers listened-to by default include the loggers for this library, as well as the loggers for bluesky and ophyd_async. The severities of those loggers are set to INFO by default.