trace_set_at

lsst.utils.logging.trace_set_at(name: str, number: int) None

Adjust logging level to display messages with the trace number being less than or equal to the provided value.

Parameters:
namestr

Name of the logger.

numberint

The trace number threshold for display.

Notes

Loggers TRACE0. to TRACE5. are set. All loggers above the specified threshold are set to INFO and those below the threshold are set to DEBUG. The expectation is that TRACE loggers only issue DEBUG log messages.

If lsst.log is installed, this function will also call lsst.log.utils.traceSetAt to ensure that non-Python loggers are also configured correctly.

Examples

lsst.utils.logging.trace_set_at("lsst.afw", 3)

This will set loggers TRACE0.lsst.afw to TRACE3.lsst.afw to DEBUG and TRACE4.lsst.afw and TRACE5.lsst.afw to INFO.