PeriodicLogger¶
- class lsst.utils.logging.PeriodicLogger(logger: Union[Logger, LsstLogAdapter], interval: Optional[float] = None, level: int = 15)¶
Bases:
object
Issue log messages if a time threshold has elapsed.
This class can be used in long-running sections of code where it would be useful to issue a log message periodically to show that the algorithm is progressing.
- Parameters:
- logger
logging.Logger
orLsstLogAdapter
Logger to use when issuing a message.
- interval
float
The minimum interval between log messages. If
None
the class default will be used.- level
int
, optional Log level to use when issuing messages.
- logger
Attributes Summary
Default interval between log messages.
Methods Summary
log
(msg, *args)Issue a log message if the interval has elapsed.
Attributes Documentation
- LOGGING_INTERVAL = 600.0¶
Default interval between log messages.
Methods Documentation