Utility functions¶
Miscellaneous utility functions for initializing logging.
laboneq.laboneq_logging
¶
initialize_logging(performance_log=False, logging_config_dict=None, log_level=None, warnings=True, server_log=False)
¶
Configure logging.
If logging has already been configured, it is configured again.
The logging configuration is read from one of the following, in order of preference:
- The default log configuration file,
./controller_log_config.yml. - The configuration dictionary passed via the
logging_config_dictparameter. - The hardcoded default configuration.
In the hardcoded default configuration:
laboneqmessages are logged at theINFOlevel tostdoutand to the filelaboneq_output/log/controller.log.node.logmessages are logged at theDEBUGlevel to the filelaboneq_output/log/node.log.- Other messages are logged at the
ERRORlevel tostderr.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
performance_log
|
bool
|
If true, timestamped logs are written to
|
False
|
logging_config_dict
|
dict | None
|
The logging configuration to use. Only used if the
default log configuration file, |
None
|
log_level
|
int | str | None
|
If specified, sets the log level for the |
None
|
warnings
|
bool
|
If true, warnings are captured to the logging system. |
True
|