analytics: Move logging config into LOGGING, use "zulip.analytics".

This should not reuse (and reconfigure!) the "zulip.management"
logger.
This commit is contained in:
Alex Vandiver
2023-11-17 18:40:09 +00:00
committed by Tim Abbott
parent efa9bf36eb
commit 7233841171
2 changed files with 12 additions and 4 deletions

View File

@@ -763,6 +763,12 @@ LOGGING: Dict[str, Any] = {
else []
),
},
"analytics_file": {
"level": "DEBUG",
"class": "logging.handlers.WatchedFileHandler",
"formatter": "default",
"filename": ANALYTICS_LOG_PATH,
},
"auth_file": {
"level": "DEBUG",
"class": "logging.handlers.WatchedFileHandler",
@@ -929,6 +935,10 @@ LOGGING: Dict[str, Any] = {
"zerver.management.commands.deliver_scheduled_messages": {
"level": "DEBUG",
},
"zulip.analytics": {
"handlers": ["analytics_file", "errors_file"],
"propagate": False,
},
"zulip.auth": {
"level": "DEBUG",
"handlers": [*DEFAULT_ZULIP_HANDLERS, "auth_file"],