LogHandler#
- class lsst.log.LogHandler(level=0)#
Bases:
HandlerHandler for Python logging module that emits to LSST logging.
Parameters#
- level
int Level at which to set the this handler.
Notes#
If this handler is enabled and
lsst.loghas been configured to use Pythonlogging, the handler will do nothing itself if any other handler has been registered with the Python logger. If it does not think that anything else is handling the message it will attempt to send the message via a defaultStreamHandler. The safest approach is to configure the logger with an additional handler (possibly the ROOT logger) iflsst.logis to be configured to use Python logging.Methods Summary
emit(record)Do whatever it takes to actually log the specified logging record.
handle(record)Conditionally emit the specified logging record.
Methods Documentation
- emit(record)#
Do whatever it takes to actually log the specified logging record.
This version is intended to be implemented by subclasses and so raises a NotImplementedError.
- handle(record)#
Conditionally emit the specified logging record.
Emission depends on filters which may have been added to the handler. Wrap the actual emission of the record with acquisition/release of the I/O thread lock.
Returns an instance of the log record that was emitted if it passed all filters, otherwise a false value is returned.
- level