parsley.logger.formatter package¶
Submodules¶
parsley.logger.formatter.abstractlogformat module¶
Abstract base class for log formatters.
-
class
parsley.logger.formatter.abstractlogformat.
Logformat
¶ Bases:
object
Abstract base class for log message formatters (html, plain, …). For existing implementations, see parsley.logger.formatter.
Returns a footer string for the log output (like an html footer).
- Return type
str
-
header
()¶ Returns a header string for the log output (like an html header).
- Return type
str
-
log
(logmessage)¶ Renders the information for one log message into a formatted string (plaintext, html, …).
- Parameters
logmessage (parsley.logger.logger.LogMessage) – The parsley.logger.logger.LogMessage log message.
- Return type
str
parsley.logger.formatter.htmllogformat module¶
-
class
parsley.logger.formatter.htmllogformat.
HtmlLogformat
¶ Bases:
parsley.logger.formatter.abstractlogformat.Logformat
Returns a footer string for the log output (like an html footer).
-
static
get_htmlcolor_for_severity
(severity)¶
-
header
()¶ Returns a header string for the log output (like an html header).
-
log
(logmessage)¶ Renders the information for one log message into a formatted string (plaintext, html, …).
- Parameters
logmessage – The parsley.logger.logger.LogMessage log message.
parsley.logger.formatter.plaintextlogformat module¶
-
class
parsley.logger.formatter.plaintextlogformat.
PlaintextLogformat
(maxlen=80, color=None)¶ Bases:
parsley.logger.formatter.abstractlogformat.Logformat
Returns a footer string for the log output (like an html footer).
-
header
()¶ Returns a header string for the log output (like an html header).
-
log
(logmessage)¶ Renders the information for one log message into a formatted string (plaintext, html, …).
- Parameters
logmessage – The parsley.logger.logger.LogMessage log message.
Module contents¶
Transforming log message structures to strings.