Changeset - a19f3f2293ba
[Not reviewed]
default
0 1 0
Dennis Fink - 10 years ago 2014-10-23 15:40:25
dennis.fink@c3l.lu
Fix ENABLE_DEBUG_LOG
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
ennstatus/log.py
Show inline comments
 
@@ -15,25 +15,25 @@ def init_logging(app):
 
    stream_handler = logging.StreamHandler()
 
    stream_handler.setLevel(logging.DEBUG)
 
    stream_handler.setFormatter(logging_debug_formatter)
 

	
 
    rotating_file_handler = logging.handlers.RotatingFileHandler(
 
        'log/ennstatus.log',
 
        maxBytes=1300000,
 
        backupCount=10,
 
        encoding='utf-8')
 
    rotating_file_handler.setLevel(logging.INFO)
 
    rotating_file_handler.setFormatter(logging_formatter)
 

	
 
    if app.debug or app.config['ENABLE_DEBUG_LOG']:
 
    if app.debug or ('ENABLE_DEBUG_LOG' in app.config and app.config['ENABLE_DEBUG_LOG']):
 
        second_rotating_file_handler = logging.handlers.RotatingFileHandler(
 
            'log/ennstatus_debug.log',
 
            maxBytes=1300000,
 
            backupCount=20,
 
            encoding='utf-8')
 
        second_rotating_file_handler.setLevel(logging.DEBUG)
 
        second_rotating_file_handler.setFormatter(logging_debug_formatter)
 
        app.logger.addHandler(second_rotating_file_handler)
 

	
 
    smtp_handler = logging.handlers.SMTPHandler(
 
        'localhost',
 
        'ennstatus@enn.lu',
0 comments (0 inline, 0 general)