forked from Ponysearch/Ponysearch
[mod] production mode: make sure to set the log level to WARNING
set: * the root logger level to WARNING * the werkzeug logger level to WARNING (useful when there is no uwsgi)
This commit is contained in:
parent
0e42db9da1
commit
6abc37efc7
1 changed files with 4 additions and 1 deletions
|
@ -18,6 +18,7 @@ LOG_FORMAT_DEBUG = '%(levelname)-7s %(name)-30.30s: %(message)s'
|
|||
|
||||
# Production
|
||||
LOG_FORMAT_PROD = '%(asctime)-15s %(levelname)s:%(name)s: %(message)s'
|
||||
LOG_LEVEL_PROD = logging.WARNING
|
||||
|
||||
searx_dir = abspath(dirname(__file__))
|
||||
searx_parent_dir = abspath(dirname(dirname(__file__)))
|
||||
|
@ -95,7 +96,9 @@ searx_debug = settings['general']['debug']
|
|||
if searx_debug:
|
||||
logging_config_debug()
|
||||
else:
|
||||
logging.basicConfig(level=logging.WARNING, format=LOG_FORMAT_PROD)
|
||||
logging.basicConfig(level=LOG_LEVEL_PROD, format=LOG_FORMAT_PROD)
|
||||
logging.root.setLevel(level=LOG_LEVEL_PROD)
|
||||
logging.getLogger('werkzeug').setLevel(level=LOG_LEVEL_PROD)
|
||||
logger = logging.getLogger('searx')
|
||||
logger.info(settings_load_message)
|
||||
|
||||
|
|
Loading…
Reference in a new issue