1. André Felipe Dias
  2. wheezy.web

Commits

Andriy Kornatskyy  committed f7ee00a

Use configuration file for unhandled error log handler.

  • Participants
  • Parent commits 24fb9ef
  • Branches default

Comments (0)

Files changed (2)

File demos/template/development.ini

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

File demos/template/src/config.py

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