Skip to content

Commit

Permalink
Bugfix: Set the level of the loggers.
Browse files Browse the repository at this point in the history
  • Loading branch information
javiquinte committed Dec 27, 2017
1 parent 2aecea5 commit e64623f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions owndc/owndc.py
Original file line number Diff line number Diff line change
Expand Up @@ -573,27 +573,27 @@ def main():
# Logging configuration
verbo = configP.get('Logging', 'main') if configP.has_option('Logging', 'main') else 'INFO'
verboNum = getattr(logging, verbo.upper(), 30)
LOG_CONF['handlers']['main']['level'] = verboNum
LOG_CONF['loggers']['main']['level'] = verboNum

verbo = configP.get('Logging', 'ResultFile') if configP.has_option('Logging', 'ResultFile') else 'INFO'
verboNum = getattr(logging, verbo.upper(), 30)
LOG_CONF['handlers']['ResultFile']['level'] = verboNum
LOG_CONF['loggers']['ResultFile']['level'] = verboNum

verbo = configP.get('Logging', 'DataSelectQuery') if configP.has_option('Logging', 'DataSelectQuery') else 'INFO'
verboNum = getattr(logging, verbo.upper(), 30)
LOG_CONF['handlers']['DataSelectQuery']['level'] = verboNum
LOG_CONF['loggers']['DataSelectQuery']['level'] = verboNum

verbo = configP.get('Logging', 'Application') if configP.has_option('Logging', 'Application') else 'INFO'
verboNum = getattr(logging, verbo.upper(), 30)
LOG_CONF['handlers']['Application']['level'] = verboNum
LOG_CONF['loggers']['Application']['level'] = verboNum

verbo = configP.get('Logging', 'cherrypy.access') if configP.has_option('Logging', 'cherrypy.access') else 'INFO'
verboNum = getattr(logging, verbo.upper(), 30)
LOG_CONF['handlers']['cherrypy.access']['level'] = verboNum
LOG_CONF['loggers']['cherrypy.access']['level'] = verboNum

verbo = configP.get('Logging', 'cherrypy.error') if configP.has_option('Logging', 'cherrypy.error') else 'INFO'
verboNum = getattr(logging, verbo.upper(), 30)
LOG_CONF['handlers']['cherrypy.error']['level'] = verboNum
LOG_CONF['loggers']['cherrypy.error']['level'] = verboNum

logging.config.dictConfig(LOG_CONF)

Expand Down
2 changes: 1 addition & 1 deletion owndc/owndcupdate.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ def main():

config = configparser.RawConfigParser()
if not len(config.read(cfgname)):
logs.error('Configuration file %s could not be read' % cfgname)
print('Configuration file %s could not be read' % cfgname)

# Command line parameter has priority
try:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
# Versions should comply with PEP440. For a discussion on single-sourcing
# the version across setup.py and the project code, see
# https://packaging.python.org/en/latest/single_source_version.html
version='0.9.1a1.dev34',
version='0.9.1a1.dev35',

description='owndc: An FDSN Virtual Datacentre for SeisComP3',
long_description=long_description,
Expand Down

0 comments on commit e64623f

Please sign in to comment.