diff --git a/configs/development.ini b/configs/development.ini --- a/configs/development.ini +++ b/configs/development.ini @@ -228,49 +228,49 @@ core.binary_dir = "" ; LOGGING CONFIGURATION ; ##################### -#[loggers] -#keys = root, vcsserver +[loggers] +keys = root, vcsserver -#[handlers] -#keys = console +[handlers] +keys = console -#[formatters] -#keys = generic +[formatters] +keys = generic, json ; ####### ; LOGGERS ; ####### -#[logger_root] -#level = NOTSET -#handlers = console +[logger_root] +level = NOTSET +handlers = console -#[logger_vcsserver] -#level = INFO -#handlers = -#qualname = vcsserver -#propagate = 1 +[logger_vcsserver] +level = DEBUG +handlers = +qualname = vcsserver +propagate = 1 ; ######## ; HANDLERS ; ######## -#[handler_console] -#class = StreamHandler -#args = (sys.stderr, ) -#level = INFO +[handler_console] +class = StreamHandler +args = (sys.stderr, ) +level = DEBUG +formatter = generic ; To enable JSON formatted logs replace generic with json ; This allows sending properly formatted logs to grafana loki or elasticsearch #formatter = json -#formatter = generic ; ########## ; FORMATTERS ; ########## -#[formatter_generic] -#format = %(asctime)s.%(msecs)03d [%(process)d] %(levelname)-5.5s [%(name)s] %(message)s -#datefmt = %Y-%m-%d %H:%M:%S +[formatter_generic] +format = %(asctime)s.%(msecs)03d [%(process)d] %(levelname)-5.5s [%(name)s] %(message)s +datefmt = %Y-%m-%d %H:%M:%S -#[formatter_json] -#format = %(timestamp)s %(levelname)s %(name)s %(message)s %(req_id)s -#class = vcsserver.lib._vendor.jsonlogger.JsonFormatter +[formatter_json] +format = %(timestamp)s %(levelname)s %(name)s %(message)s %(req_id)s +class = vcsserver.lib._vendor.jsonlogger.JsonFormatter diff --git a/configs/gunicorn_config.py b/configs/gunicorn_config.py --- a/configs/gunicorn_config.py +++ b/configs/gunicorn_config.py @@ -29,6 +29,8 @@ accesslog = '-' worker_tmp_dir = None tmp_upload_dir = None +#reuse_port = True + # Custom log format #access_log_format = ( # '%(t)s %(p)s INFO [GNCRN] %(h)-15s rqt:%(L)s %(s)s %(b)-6s "%(m)s:%(U)s %(q)s" usr:%(u)s "%(f)s" "%(a)s"') diff --git a/configs/production.ini b/configs/production.ini --- a/configs/production.ini +++ b/configs/production.ini @@ -191,49 +191,49 @@ core.binary_dir = "" ; LOGGING CONFIGURATION ; ##################### -#[loggers] -#keys = root, vcsserver +[loggers] +keys = root, vcsserver -#[handlers] -#keys = console +[handlers] +keys = console -#[formatters] -#keys = generic +[formatters] +keys = generic, json ; ####### ; LOGGERS ; ####### -#[logger_root] -#level = NOTSET -#handlers = console +[logger_root] +level = NOTSET +handlers = console -#[logger_vcsserver] -#level = INFO -#handlers = -#qualname = vcsserver -#propagate = 1 +[logger_vcsserver] +level = INFO +handlers = +qualname = vcsserver +propagate = 1 ; ######## ; HANDLERS ; ######## -#[handler_console] -#class = StreamHandler -#args = (sys.stderr, ) -#level = INFO +[handler_console] +class = StreamHandler +args = (sys.stderr, ) +level = INFO +formatter = generic ; To enable JSON formatted logs replace generic with json ; This allows sending properly formatted logs to grafana loki or elasticsearch #formatter = json -#formatter = generic ; ########## ; FORMATTERS ; ########## -#[formatter_generic] -#format = %(asctime)s.%(msecs)03d [%(process)d] %(levelname)-5.5s [%(name)s] %(message)s -#datefmt = %Y-%m-%d %H:%M:%S +[formatter_generic] +format = %(asctime)s.%(msecs)03d [%(process)d] %(levelname)-5.5s [%(name)s] %(message)s +datefmt = %Y-%m-%d %H:%M:%S -#[formatter_json] -#format = %(timestamp)s %(levelname)s %(name)s %(message)s %(req_id)s -#class = vcsserver.lib._vendor.jsonlogger.JsonFormatter +[formatter_json] +format = %(timestamp)s %(levelname)s %(name)s %(message)s %(req_id)s +class = vcsserver.lib._vendor.jsonlogger.JsonFormatter