lenskit.logging.LoggingConfig ============================= .. py:class:: lenskit.logging.LoggingConfig :canonical: lenskit.logging._config.LoggingConfig Configuration for LensKit logging. This class is intended as a convenience for LensKit applications to set up a useful logging and progress reporting configuration; if unconfigured, LensKit will emit its logging messages directly to :mod:`structlog` and/or :mod:`logging`, which you can configure in any way you wish. :Stability: Caller .. py:attribute:: level :type: int :value: 20 .. py:attribute:: stream :type: Literal['full', 'simple', 'json'] :value: 'full' .. py:attribute:: progress_backend :type: Literal['notebook', 'rich'] | None :value: None .. py:attribute:: file :type: pathlib.Path | None :value: None .. py:attribute:: file_level :type: int | None :value: None .. py:attribute:: file_format :type: LogFormat :value: 'json' .. py:property:: effective_level :type: int .. py:method:: set_stream_mode(mode) Configure the standard error stream mode. .. py:method:: set_verbose(verbose = True) Enable verbose logging. .. note:: It is better to only call this method if your application's ``verbose`` option is provided, rather than passing your verbose option to it, to allow the ``LK_LOG_LEVEL`` environment variable to apply in the absence of a configuration option. :param verbose: The level of verbosity. Values of ``True`` or ``1`` turn on ``DEBUG``-level logs, and ``2`` or greater turns on tracing. .. py:method:: set_log_file(path, level = None, format = 'json') Configure a log file. .. py:method:: apply() Apply the configuration.