Logs¶
Set up some system-wide loggers
The logs
Module¶
Set up some system-wide loggers
-
class
openquake.engine.logs.
LogDatabaseHandler
(job_id)[source]¶ Bases:
logging.Handler
Log stream handler
-
class
openquake.engine.logs.
LogFileHandler
(job_id, log_file)[source]¶ Bases:
logging.FileHandler
Log file handler
-
class
openquake.engine.logs.
LogStreamHandler
(job_id)[source]¶ Bases:
logging.StreamHandler
Log stream handler
-
openquake.engine.logs.
dbcmd
(action, *args)[source]¶ A dispatcher to the database server.
Parameters: - action – database action to perform
- args – arguments
-
openquake.engine.logs.
handle
(*args, **kwds)[source]¶ Context manager adding and removing log handlers.
Parameters: - job_id – ID of the current job
- log_level – one of debug, info, warn, error, critical
- log_file – log file path (if None, logs on stdout only)