Logging - cihai.log¶
Log utilities for cihai.
cihai.log¶
- class cihai.log.LogFormatter(color=True, **kwargs)[source]¶
Bases:
FormatterLog formatter for cihai.
Initialize the formatter with specified format strings.
Initialize the formatter either with the specified format string, or a default as described above. Allow for specialized date formatting with the optional datefmt argument. If datefmt is omitted, you get an ISO8601-like (or RFC 3339-like) format.
Use a style parameter of ‘%’, ‘{’ or ‘$’ to specify that you want to use one of %-formatting,
str.format()({}) formatting orstring.Templateformatting in your format string.Changed in version 3.2: Added the
styleparameter.- template(record)[source]¶
Return the prefix for the log message. Template for Formatter.
- Return type:
- Parameters:
record (
logging.LogRecord) – Passed in from inside thelogging.Formatter.format()record.
- class cihai.log.DebugLogFormatter(color=True, **kwargs)[source]¶
Bases:
LogFormatterProvides greater technical details than standard log Formatter.
Initialize the formatter with specified format strings.
Initialize the formatter either with the specified format string, or a default as described above. Allow for specialized date formatting with the optional datefmt argument. If datefmt is omitted, you get an ISO8601-like (or RFC 3339-like) format.
Use a style parameter of ‘%’, ‘{’ or ‘$’ to specify that you want to use one of %-formatting,
str.format()({}) formatting orstring.Templateformatting in your format string.Changed in version 3.2: Added the
styleparameter.- template(record)[source]¶
Return the prefix for the log message. Template for Formatter.
- Return type:
- Parameters:
record (
logging.LogRecord) – Passed in from inside thelogging.Formatter.format()record.