Skip to content

Utility functions

Miscellaneous utility functions for installing access tokens (deprecated) and initializing logging.



Install a LabOne Q access token for use with real hardware.

This function does not do anything. It remains only for backwards compatibility with earlier versions.

Deprecated in version 2.9.0

The need for an access token to run LabOne Q on real hardware was removed.


Name Type Description Default
token str

The access token to use. Ignored.



initialize_logging(performance_log=False, logging_config_dict=None, log_level=None)

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_dict parameter.
  • The hardcoded default configuration.

In the hardcoded default configuration:

  • laboneq messages are logged at the INFO level to stdout and to the file laboneq_output/log/controller.log.
  • node.log messages are logged at the DEBUG level to the file laboneq_output/log/node.log.
  • Other messages are logged at the ERROR level to stderr.


Name Type Description Default
performance_log bool

If true, timestamped logs are written to laboneq_output/log/controller_perf.log at the DEBUG level.

logging_config_dict dict

The logging configuration to use. Only used if the default log configuration file, ./controller_log_config.yml does not exist.

log_level int | str

If specified, sets the log level for the laboneq logger.



Set the logging level for the root and laboneq loggers.


Name Type Description Default
log_level int | str

The logging level to set.