libioc.Logger module¶
ioc logging module.
-
class
libioc.Logger.
LogEntry
(message, level, indent=0, logger=None)[source]¶ Bases:
object
A single log entry.
-
class
libioc.Logger.
Logger
(print_level=None, log_directory='/var/log/iocage')[source]¶ Bases:
object
ioc Logger module.
-
COLORS
= ('black', 'red', 'green', 'yellow', 'blue', 'margenta', 'cyan', 'white')¶
-
LOG_LEVELS
= ('critical', 'error', 'warn', 'info', 'notice', 'verbose', 'debug', 'spam', 'screen')¶
-
LOG_LEVEL_SETTINGS
= {'critical': {'bold': True, 'color': 'red'}, 'debug': {'color': 'green'}, 'error': {'color': 'red'}, 'info': {'color': None}, 'notice': {'color': 'magenta'}, 'screen': {'color': None}, 'spam': {'color': 'green'}, 'verbose': {'color': 'blue'}, 'warn': {'color': 'yellow'}}¶
-
PRINT_HISTORY
= []¶
-
property
default_print_level
¶ Return the static default print level.
- Return type
str
-
property
print_level
¶ Return the configured or default print level.
- Return type
str
-