.. _concepts_logging: Logging ======= Configuration ------------- Configuration of logging is done via a configuration file. The default configuration file is `config/config_logging.conf` and can be substituted by setting `settings.logging.configfile`, e.g. .. code-block:: sh [logging] configfile = "./shobnetpy/config/config_logging_user.conf" Per default, above `WARN`-Level will be logged to the console, and above `INFO`-Level will be logged to a file at `/logs/shobnetpy.log`. To adjust loglevels for specific subpackages or module add a section to your custom configuration file like: .. code-block:: sh [logger_shobnetpy_geo] level=DEBUG handlers= qualname=shobnetpy.geo propagate=1 More information can be obtained from the `Logging Cookbook `_. .. _concepts_logging_implementation: Implementation -------------- AHID uses the python logging framework. Configuration code is placed in `util/logging.py` and called in `config/config.py` with the advantage that no additional import is required in modules. All we need in modules is the logger obtained by .. code-block:: python logger = logging.getLogger('shobnetpy.subpackage.module') Log messages are triggered by .. code-block:: python logger.info("Information for the user") logger.debug("Information that helps to debug code")