diff python/zcc.py @ 281:4496cae24d7f

Improved logview
author Windel Bouwman
date Sat, 02 Nov 2013 11:11:40 +0100
parents 56d37ed4b4d2
children 1c7c1e619be8
line wrap: on
line diff
--- a/python/zcc.py	Sat Nov 02 10:03:26 2013 +0100
+++ b/python/zcc.py	Sat Nov 02 11:11:40 2013 +0100
@@ -8,6 +8,8 @@
 import hexfile
 import logging
 
+logformat='%(asctime)s|%(levelname)s|%(name)s|%(message)s'
+
 def logLevel(s):
     numeric_level = getattr(logging, s.upper(), None)
     if not isinstance(numeric_level, int):
@@ -46,8 +48,6 @@
     obj = cg.generate(ircode)
     return True
 
-logformat='%(asctime)s|%(levelname)s|%(name)s|%(message)s'
-
 def main(args):
     logging.basicConfig(format=logformat, level=args.log)
     src = args.source.read()