summaryrefslogtreecommitdiff
path: root/configshell/log.py
diff options
context:
space:
mode:
Diffstat (limited to 'configshell/log.py')
-rw-r--r--configshell/log.py13
1 files changed, 11 insertions, 2 deletions
diff --git a/configshell/log.py b/configshell/log.py
index e932aaa..003d862 100644
--- a/configshell/log.py
+++ b/configshell/log.py
@@ -28,6 +28,7 @@ class Log(object):
Implements a file and console logger using python's logging facility.
Log levels are, in raising criticality:
- debug
+ - verbose
- info
- warning
- error
@@ -36,9 +37,9 @@ class Log(object):
who can then be read/changed by other objects using Prefs()
'''
__borg_state = {}
- levels = ['critical', 'error', 'warning', 'info', 'debug']
+ levels = ['critical', 'error', 'warning', 'info', 'verbose', 'debug']
colors = {'critical': 'red', 'error': 'red', 'warning': 'yellow',
- 'info': 'green', 'debug': 'blue'}
+ 'info': 'green', 'verbose': 'blue', 'debug': 'blue'}
def __init__(self, console_level=None,
logfile=None, file_level=None):
@@ -138,6 +139,14 @@ class Log(object):
trace += '\n%s' % msg
self._log('error', trace)
+ def verbose(self, msg):
+ '''
+ Logs a verbose message.
+ @param msg: The message to log.
+ @type msg: str
+ '''
+ self._log('verbose', msg)
+
def info(self, msg):
'''
Logs an info message.