parsley.logger package

Submodules

parsley.logger.logger module

Logging messages.

class parsley.logger.logger.LogMessage(sync, subject, verb, comment, severity, symbol)

Bases: object

A single log message.

This is used in the logging backend. You do not need this class just for logging.

Parameters
  • sync (str) –

  • subject (str) –

  • verb (str) –

  • comment (str) –

  • severity (int) –

  • symbol (str) –

class parsley.logger.logger.Logger(formatter, loggerout, minseverity=3, maxseverity=None, enabled=True)

Bases: object

Used by higher layers for logging messages. Contains a parsley.logger.formatter.abstractlogformat.Logformat and a parsley.logger.loggerout.abstractloggerout.Loggerout and defines which severity span should actually be logged.

Parameters
flush()

Closes the logger and commits the content.

Return type

None

log(sync, subject, verb, comment, severity, symbol)

Logs a message.

Parameters
  • sync (str) – The name of the synchronization task that is presented as the source (arbitrary string).

  • subject (str) – The subject string.

  • verb (str) – The verb string.

  • comment (str) – The comment string.

  • severity (int) – The severity (parsley.logger.logger.Severity).

  • symbol (str) – The event symbol string.

Return type

None

class parsley.logger.logger.Severity

Bases: object

Enumeration for the severity of log messages.

DEBUG = 2
DEBUGVERBOSE = 1
ERROR = 6
IMPORTANT = 4
INFO = 3
MOREIMPORTANT = 5
_MAX_TYPICAL = 6

This is the maximum severity value for typical log messages. Everything above is for special purpose categories.

Module contents

Logging messages. See parsley.logger.logger.