Logging (rever.logger
)¶
Logging tools for rever
-
class
rever.logger.
Logger
(filename)¶ A logging object for rever that stores information in line-oriented JSON format.
- Parameters
- filenamestr
Path to logfile, if a realtive pathname is given it is relative to $REVER_DIR.
-
load
()¶ Loads all of the records from the logfile and returns a list of dicts. If the log file does not yet exist, this returns an empty list.
-
log
(message, activity=None, category='misc', data=None, version=None)¶ Logs a message, the associated activity (optional), the timestamp, and the current revision to the log file.
-
property
argparser
¶ Returns an argument parser for the logger
-
property
filename
¶
-
rever.logger.
current_logger
()¶ Retuns the current logger instance.
-
rever.logger.
log
(args, stdin=None)¶ Command line interface for logging a message