pyIPCMI.Base.Logging.py¶
Classes
Severity
: Logging message severity levels.LogEntry
: Represents a single line log message with a severity and indentation level.Logger
: Undocumented.ILogable
: A mixin class to provide local logging methods.
-
class
pyIPCMI.Base.Logging.
Severity
(*_)[source] Logging message severity levels.
Inheritance
Members
-
Fatal
= 30
-
Error
= 25
-
Quiet
= 20
-
Warning
= 15
-
Info
= 10
-
DryRun
= 5
-
Normal
= 4
-
Verbose
= 2
-
Debug
= 1
-
All
= 0
-
-
class
pyIPCMI.Base.Logging.
LogEntry
(message, severity=<Severity.Normal: 4>, indent=0, appendLinebreak=True)[source] Represents a single line log message with a severity and indentation level.
Inheritance
Members
-
_Log_MESSAGE_FORMAT__
= {<Severity.Debug: 1>: 'DEBUG: {message}', <Severity.Verbose: 2>: 'VERBOSE: {message}', <Severity.Normal: 4>: '{message}', <Severity.DryRun: 5>: 'DRYRUN: {message}', <Severity.Info: 10>: 'INFO: {message}', <Severity.Warning: 15>: 'WARNING: {message}', <Severity.Quiet: 20>: '{message}', <Severity.Error: 25>: 'ERROR: {message}', <Severity.Fatal: 30>: 'FATAL: {message}'}
-
Severity
Return the log message’s severity level.
-
Indent
Return the log message’s indentation level.
-
Message
Return the indented log message.
-
IndentBy
(indent)[source] Increase a log message’s indentation level.
-
-
class
pyIPCMI.Base.Logging.
Logger
(logLevel, printToStdOut=True)[source] Inheritance
Members
-
LogLevel
Return the currently logged minimal severity level.
-
BaseIndent
-
_Log_MESSAGE_FORMAT__
= {<Severity.Debug: 1>: '{DARK_GRAY}{message}{NOCOLOR}', <Severity.Verbose: 2>: '{GRAY}{message}{NOCOLOR}', <Severity.Normal: 4>: '{WHITE}{message}{NOCOLOR}', <Severity.DryRun: 5>: '{DARK_CYAN}{message}{NOCOLOR}', <Severity.Info: 10>: '{WHITE}{message}{NOCOLOR}', <Severity.Warning: 15>: '{YELLOW}{message}{NOCOLOR}', <Severity.Quiet: 20>: '{WHITE}{message}{NOCOLOR}', <Severity.Error: 25>: '{RED}{message}{NOCOLOR}', <Severity.Fatal: 30>: '{DARK_RED}{message}{NOCOLOR}'}
-
Write
(entry)[source]
-
TryWrite
(entry)[source]
-
WriteFatal
(message, indent=0, appendLinebreak=True)[source]
-
WriteError
(message, indent=0, appendLinebreak=True)[source]
-
WriteWarning
(message, indent=0, appendLinebreak=True)[source]
-
WriteInfo
(message, indent=0, appendLinebreak=True)[source]
-
WriteQuiet
(message, indent=0, appendLinebreak=True)[source]
-
WriteNormal
(message, indent=0, appendLinebreak=True)[source]
-
WriteVerbose
(message, indent=1, appendLinebreak=True)[source]
-
WriteDebug
(message, indent=2, appendLinebreak=True)[source]
-
WriteDryRun
(message, indent=2, appendLinebreak=True)[source]
-
-
class
pyIPCMI.Base.Logging.
ILogable
(logger=None)[source] A mixin class to provide local logging methods.
Inheritance
Members
-
Logger
Return the local logger instance.
-
Log
(entry, condition=True)[source] Write an entry to the local logger.
-
_TryLog
(*args, condition=True, **kwargs)[source]
-
LogFatal
(*args, condition=True, **kwargs)[source]
-
LogError
(*args, condition=True, **kwargs)[source]
-
LogWarning
(*args, condition=True, **kwargs)[source]
-
LogInfo
(*args, condition=True, **kwargs)[source]
-
LogQuiet
(*args, condition=True, **kwargs)[source]
-
LogNormal
(*args, condition=True, **kwargs)[source]
-
LogVerbose
(*args, condition=True, **kwargs)[source]
-
LogDebug
(*args, condition=True, **kwargs)[source]
-
LogDryRun
(*args, condition=True, **kwargs)[source]
-