diff options
Diffstat (limited to 'nikola/plugins/loghandler/stderr.py')
| -rw-r--r-- | nikola/plugins/loghandler/stderr.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/nikola/plugins/loghandler/stderr.py b/nikola/plugins/loghandler/stderr.py index 75acffc..fdc892e 100644 --- a/nikola/plugins/loghandler/stderr.py +++ b/nikola/plugins/loghandler/stderr.py @@ -26,10 +26,10 @@ from nikola.plugin_categories import SignalHandler from blinker import signal -import logbook import os from nikola import DEBUG +from nikola.utils import ColorfulStderrHandler class StderrHandler(SignalHandler): @@ -40,7 +40,7 @@ class StderrHandler(SignalHandler): """Attach the handler to the logger.""" conf = self.site.config.get('LOGGING_HANDLERS').get('stderr') if conf or os.getenv('NIKOLA_DEBUG'): - self.site.loghandlers.append(logbook.StderrHandler( + self.site.loghandlers.append(ColorfulStderrHandler( level='DEBUG' if DEBUG else conf.get('loglevel', 'WARNING').upper(), format_string=u'[{record.time:%Y-%m-%dT%H:%M:%SZ}] {record.level_name}: {record.channel}: {record.message}' )) |
