summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKai Huuhko <kai.huuhko@gmail.com>2014-05-22 01:45:34 +0300
committerKai Huuhko <kai.huuhko@gmail.com>2014-05-22 01:45:34 +0300
commit5959946a33829989a8913b60fe9b8a307b9c8269 (patch)
tree4095a1ce5366c8de7b6e761ef60a8724ebaba670
parentfa22f4a7bc833702ba162d4b101bf5b4dacf6882 (diff)
Logging formatter
-rwxr-xr-xeconnman-bin.in9
1 files changed, 7 insertions, 2 deletions
diff --git a/econnman-bin.in b/econnman-bin.in
index c40a3a3..67f7454 100755
--- a/econnman-bin.in
+++ b/econnman-bin.in
@@ -62,8 +62,13 @@ except:
62 62
63dbus_ml = DBusEcoreMainLoop() 63dbus_ml = DBusEcoreMainLoop()
64bus = dbus.SystemBus(mainloop=dbus_ml) 64bus = dbus.SystemBus(mainloop=dbus_ml)
65log = logging.getLogger() 65log = logging.getLogger("econnman")
66log.addHandler(logging.StreamHandler()) 66log_handler = logging.StreamHandler()
67log_formatter = logging.Formatter(
68 "%(relativeCreated)d %(levelname)s %(name)s: %(message)s"
69 )
70log_handler.setFormatter(log_formatter)
71log.addHandler(log_handler)
67 72
68manager = None 73manager = None
69 74