mirror of
https://github.com/bugsink/bugsink.git
synced 2025-12-30 18:00:17 -06:00
Logging fixes
* only use snappea handler when there was already something configured * in development, use the 'snappea' rather than the 'look below' version for snappea
This commit is contained in:
@@ -227,4 +227,5 @@ if I_AM_RUNNING == "SNAPPEA":
|
||||
# We set all handlers to the snappea handler in this case: this way the things that are logged inside individual
|
||||
# workers show up with the relevant worker-annotations (i.e. threadName).
|
||||
for logger in LOGGING['loggers'].values():
|
||||
logger["handlers"] = ["snappea"]
|
||||
if "handlers" in logger and "console" in logger["handlers"]:
|
||||
logger["handlers"] = ["snappea"]
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
from .default import * # noqa
|
||||
from .default import BASE_DIR, INSTALLED_APPS, MIDDLEWARE, LOGGING, DATABASES
|
||||
from .default import BASE_DIR, INSTALLED_APPS, MIDDLEWARE, LOGGING, DATABASES, I_AM_RUNNING
|
||||
|
||||
import os
|
||||
|
||||
@@ -106,7 +106,10 @@ LOGGING["handlers"]["look_below_in_stream"] = {
|
||||
"formatter": "look_below",
|
||||
}
|
||||
|
||||
LOGGING['loggers']['bugsink.performance']["handlers"] = ["look_below_in_stream"]
|
||||
if I_AM_RUNNING == "SNAPPEA":
|
||||
LOGGING['loggers']['bugsink.performance']["handlers"] = ["snappea"]
|
||||
else:
|
||||
LOGGING['loggers']['bugsink.performance']["handlers"] = ["look_below_in_stream"]
|
||||
|
||||
|
||||
# snappea development settings: see all details, and include timestamps (we have no sytemd journal here)
|
||||
|
||||
Reference in New Issue
Block a user