Commit 95f77703 authored by Grégory Wisniewski's avatar Grégory Wisniewski

Change logging format to include module name and line number.


git-svn-id: https://svn.erp5.org/repos/neo/branches/prototype3@439 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 8e860304
......@@ -36,10 +36,11 @@ config = options.config or 'neo.conf'
section = options.section or 'master'
logfile = options.logfile or None
format='[%(module)12s:%(lineno)3d] %(message)s'
if options.verbose:
logging.basicConfig(filename = logfile, level = logging.DEBUG)
logging.basicConfig(filename=logfile, level=logging.DEBUG, format=format)
else:
logging.basicConfig(filename = logfile, level = logging.WARNING)
logging.basicConfig(filename=logfile, level=logging.WARNING, format=format)
app = Application(config, section)
app.run()
......@@ -38,10 +38,11 @@ config = options.config or 'neo.conf'
section = options.section or 'storage'
logfile = options.logfile or None
format='[%(module)12s:%(lineno)3d] %(message)s'
if options.verbose:
logging.basicConfig(filename = logfile, level = logging.DEBUG)
logging.basicConfig(filename=logfile, level=logging.DEBUG, format=format)
else:
logging.basicConfig(filename = logfile, level = logging.WARNING)
logging.basicConfig(filename=logfile, level=logging.WARNING, format=format)
app = Application(config, section, options.reset)
app.run()
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