From 9bb94f0f59b06082a73290c5ef40ba715e7faa23 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Fri, 16 Oct 2015 18:35:30 +0800 Subject: [PATCH] master/log: move formatter into LogBufferHandler --- artiq/master/log.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/artiq/master/log.py b/artiq/master/log.py index ca8e1fd71..f588e839e 100644 --- a/artiq/master/log.py +++ b/artiq/master/log.py @@ -20,6 +20,7 @@ class LogBufferHandler(logging.Handler): def __init__(self, log_buffer, *args, **kwargs): logging.Handler.__init__(self, *args, **kwargs) self.log_buffer = log_buffer + self.setFormatter(logging.Formatter("%(name)s:%(message)s")) def emit(self, record): message = self.format(record) @@ -87,7 +88,6 @@ def init_log(args): log_buffer = LogBuffer(1000) buffer_handler = LogBufferHandler(log_buffer) - buffer_handler.setFormatter(logging.Formatter("%(name)s:%(message)s")) handlers.append(buffer_handler) for handler in handlers: