Logs¶
Set up some system-wide loggers
The logs
Module¶
Set up some system-wide loggers
-
class
openquake.engine.logs.
LogDatabaseHandler
(job)[source]¶ Bases:
logging.Handler
Log stream handler
-
class
openquake.engine.logs.
LogFileHandler
(job, log_file)[source]¶ Bases:
logging.FileHandler
Log file handler
-
class
openquake.engine.logs.
LogStreamHandler
(job)[source]¶ Bases:
logging.StreamHandler
Log stream handler
-
openquake.engine.logs.
handle
(*args, **kwds)[source]¶ Context manager adding and removing log handlers.
Parameters: - job – a
openquake.engine.db.models.OqJob
instance - log_level – one of debug, info, warn, progress, error, critical
- log_file – log file path (if None, logs on stdout only)
- job – a
-
openquake.engine.logs.
set_level
(level)[source]¶ Initialize logs to write records with level level or above.