Verified Commit 969ab748 authored by Peter Stanko's avatar Peter Stanko
Browse files

Flask level to INFO - reduced spam in logs

parent 04c63057
Pipeline #17404 passed with stage
in 9 minutes and 1 second
......@@ -10,7 +10,7 @@ from portal.tools import paths
def get_logger_file(name):
return {
'level': 'DEBUG',
'level': 'INFO',
'class': 'logging.handlers.RotatingFileHandler',
'formatter': 'verbose',
'filename': str(paths.LOG_DIR / f'{name}.log'),
......@@ -57,8 +57,8 @@ LOGGERS = {
'tests': {'handlers': ['console'], 'level': 'DEBUG', 'propagate': True},
'management': {'handlers': ['console'], 'level': 'INFO', 'propagate': True},
'app': {'handlers': ['console'], 'level': 'DEBUG', 'propagate': True},
'flask': {'handlers': ['console', 'flask_file'], 'level': 'DEBUG', 'propagate': True},
'werkzeug': {'handlers': ['console'], 'level': 'DEBUG', 'propagate': True},
'flask': {'handlers': ['console', 'flask_file'], 'level': 'INFO', 'propagate': True},
'werkzeug': {'handlers': ['console'], 'level': 'INFO', 'propagate': True},
'storage': {'handlers': ['console', 'storage_file'], 'level': 'INFO', 'propagate': True},
}
......
......@@ -48,6 +48,7 @@ def access_log(func):
request = flask.request
from portal.service.rest import RestService
client = RestService().auth.client
ACCESS.info(f"[ACCESS] {client.log_name}: {request.method} {request.path} {request.data}")
return func(*args, **kwargs)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment