lsst.log

The lsst.log module provides logging for C++ and Python.

Contributing

lsst.log is developed at https://github.com/lsst/log. You can find Jira issues for this module under the log component.

Python API reference

lsst.log Package

Functions

MDC(key, value)
MDCRegisterInit(func)
MDCRemove(key)
configure(*args)
configure_prop(properties)
debug(fmt, *args)
debugf(fmt, *args, **kwargs)
doNotUsePythonLogging()
error(fmt, *args)
errorf(fmt, *args, **kwargs)
fatal(fmt, *args)
fatalf(fmt, *args, **kwargs)
getDefaultLogger()
getLevel(loggername)
getLogger(loggername)
info(fmt, *args)
infof(fmt, *args, **kwargs)
isEnabledFor(logger, level)
log(loggername, level, fmt, *args, **kwargs)
logf(loggername, level, fmt, *args, **kwargs)
lwpID()
setLevel(loggername, level)
trace(fmt, *args)
tracef(fmt, *args, **kwargs)
usePythonLogging()
warn(fmt, *args)
warnf(fmt, *args, **kwargs)
warning(fmt, *args)

Classes

LevelTranslator Helper class to translate levels between lsst.log and Python logging.
Log
LogHandler([level]) Handler for Python logging module that emits to LSST logging.
UsePythonLogging() Context manager to enable Python log forwarding temporarily.

lsst.log.utils Module

Functions

traceSetAt(name, number) Adjusts logging level to display messages with the trace number being less than or equal to the provided value.
temporaryLogLevel(name, level) A context manager that temporarily sets the level of a Log.