Commit 94cf55db authored by Maxime Perrotin's avatar Maxime Perrotin

Improve logging

parent 537361d0
......@@ -23,7 +23,7 @@ class ColorFormatter(logging.Formatter):
def __init__(self):
''' Create a custom format for the logging messages '''
fmt = "[%(levelname)-19s] \033[1m%(filename)-20s\033[0m%(message)s"
fmt = "[%(levelname)-19s] \033[0m%(message)s"
super(ColorFormatter, self).__init__(fmt)
def format(self, record):
......
......@@ -29,18 +29,14 @@ import time
from functools import partial
from ctypes import CDLL, create_string_buffer
logging.basicConfig()
log = logging.getLogger(__name__)
terminal_formatter = logging.Formatter(
fmt="%(levelname)s - %(name)s: %(message)s")
handler_console = logging.StreamHandler()
handler_console.setLevel(logging.DEBUG)
handler_console.setFormatter(terminal_formatter)
log.addHandler(handler_console)
from ColorFormatter import ColorFormatter
log = logging.getLogger(__name__)
console = logging.StreamHandler(sys.__stdout__)
console.setFormatter(ColorFormatter())
log.addHandler(console)
log.info('Starting GUI')
from asn1_value_editor import asn1Editor, asn1Viewer, __version__
from plotmanager import PlotManager
import vn
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment