Skip to content

Commit 6b5c8bc

Browse files
author
Richard Jones
committed
allow override of log level when no filename specified
1 parent fe2abfc commit 6b5c8bc

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

roundup/instance.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
1616
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
1717
#
18-
# $Id: instance.py,v 1.14 2004-06-08 05:29:18 richard Exp $
18+
# $Id: instance.py,v 1.15 2004-07-19 01:49:26 richard Exp $
1919

2020
'''Tracker handling (open tracker).
2121
@@ -101,14 +101,14 @@ def open(self, tracker_home):
101101
except ImportError, msg:
102102
raise TrackerError, 'Python logging module unavailable: %s'%msg
103103
config.logging.fileConfig(config.LOGGING_CONFIG)
104-
elif hasattr(config, 'LOGGING_FILENAME'):
104+
else:
105105
config.logging = rlog.BasicLogging()
106-
config.logging.setFile(config.LOGGING_FILENAME)
106+
if hasattr(config, 'LOGGING_FILENAME'):
107+
config.logging.setFile(config.LOGGING_FILENAME)
107108
if hasattr(config, 'LOGGING_LEVEL'):
108109
config.logging.setLevel(config.LOGGING_LEVEL)
109-
else:
110-
config.logging = rlog.BasicLogging()
111-
config.logging.setLevel('ERROR')
110+
else:
111+
config.logging.setLevel('ERROR')
112112

113113
return tracker
114114

0 commit comments

Comments
 (0)