Commits

Andriy Kornatskyy committed f7ee00a

Use configuration file for unhandled error log handler.

Comments (0)

Files changed (2)

demos/template/development.ini

 
 [runtime]
 mode = mock
+unhandled = stderr
 
 [cache-profile]
 public-enabled = False

demos/template/src/config.py

 })
 
 # HTTPErrorMiddleware
-if mode == 'mock':
+if config.get('runtime', 'unhandled') == 'stderr':
     handler = logging.StreamHandler(sys.stderr)
 else:
     raise NotImplementedError(mode)