[LNT] r312299 - Fix an error where the file logger is always used
Chris Matthews via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 31 17:46:30 PDT 2017
Author: cmatthews
Date: Thu Aug 31 17:46:29 2017
New Revision: 312299
URL: http://llvm.org/viewvc/llvm-project?rev=312299&view=rev
Log:
Fix an error where the file logger is always used
The file logger should not be used in production. The logic was wrong
for suppressing that.
Modified:
lnt/trunk/lnt/server/ui/app.py
Modified: lnt/trunk/lnt/server/ui/app.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/server/ui/app.py?rev=312299&r1=312298&r2=312299&view=diff
==============================================================================
--- lnt/trunk/lnt/server/ui/app.py (original)
+++ lnt/trunk/lnt/server/ui/app.py Thu Aug 31 17:46:29 2017
@@ -256,12 +256,14 @@ class App(LNTExceptionLoggerFlask):
# Always Print to screen.
ch = logging.StreamHandler()
ch.setLevel(logging.DEBUG)
+ ch.setFormatter(Formatter('%(levelname)s: %(message)s '
+ '[in %(filename)s:%(lineno)d %(asctime)s]'))
self.logger.addHandler(ch)
# When running in a server config, use the server to setup the log
# file. If there is more than one process running, this will not work
# well.
- if not self.config.get('log_file_name'):
+ if not log_file_name:
self.config['log_file_name'] = LOG_FILENAME
try:
rotating = logging.handlers.RotatingFileHandler(
More information about the llvm-commits
mailing list