reproman.log
- class reproman.log.ColorFormatter(use_color=None, log_name=False, log_pid=False)[source]
Bases:
Formatter- BLACK = 0
- BLUE = 4
- BOLD_SEQ = '\x1b[1m'
- COLORS = {'CRITICAL': 3, 'DEBUG': 4, 'ERROR': 1, 'INFO': 7, 'WARNING': 3}
- COLOR_SEQ = '\x1b[1;%dm'
- CYAN = 6
- GREEN = 2
- MAGENTA = 5
- RED = 1
- RESET_SEQ = '\x1b[0m'
- WHITE = 7
- YELLOW = 3
- format(record)[source]
Format the specified record as text.
The record’s attribute dictionary is used as the operand to a string formatting operation which yields the returned string. Before formatting the dictionary, a couple of preparatory steps are carried out. The message attribute of the record is computed using LogRecord.getMessage(). If the formatting string uses the time (as determined by a call to usesTime(), formatTime() is called to format the event time. If there is exception information, it is formatted using formatException() and appended to the message.