Less confusing message when logger config missing
- if the logger config is missing, don't print unnecessary stack trace - partially addresses #893
This commit is contained in:
parent
dadc3b9057
commit
61a08299b8
10
src/debug.py
10
src/debug.py
|
@ -38,10 +38,14 @@ def configureLogging():
|
||||||
try:
|
try:
|
||||||
logging.config.fileConfig(os.path.join (shared.appdata, 'logging.dat'))
|
logging.config.fileConfig(os.path.join (shared.appdata, 'logging.dat'))
|
||||||
have_logging = True
|
have_logging = True
|
||||||
print "Loaded debug config from %s" % (os.path.join(shared.appdata, 'logging.dat'))
|
print "Loaded logger configuration from %s" % (os.path.join(shared.appdata, 'logging.dat'))
|
||||||
except:
|
except:
|
||||||
print "Failed to load debug config from %s, using default logging config" % (os.path.join(shared.appdata, 'logging.dat'))
|
if os.path.isfile(os.path.join(shared.appdata, 'logging.dat')):
|
||||||
print sys.exc_info()
|
print "Failed to load logger configuration from %s, using default logging config" % (os.path.join(shared.appdata, 'logging.dat'))
|
||||||
|
print sys.exc_info()
|
||||||
|
else:
|
||||||
|
# no need to confuse the user if the logger config is missing entirely
|
||||||
|
print "Using default logger configuration"
|
||||||
|
|
||||||
sys.excepthook = log_uncaught_exceptions
|
sys.excepthook = log_uncaught_exceptions
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user