augur icon indicating copy to clipboard operation
augur copied to clipboard

Logs should be able to be consolidated into a pipe or syslog

Open jberkus opened this issue 3 years ago • 2 comments

The way it is now:

Augur logs go to as many as 30 different files spread out across a 3-level directory heirarchy. The individual filenames are based on process IDs, and as such are not predictable. This makes debugging failures very time-consuming, since every check must start with "find the appropriate log file". More importantly, it makes it impossible to integrate Augur into SRE dashboards or standard log management tools.

How it should be:

It should become possible, through a configuration option, to either log 100% of augur's output to either stderr (for container runtimes) or to the system log (syslog or journald) for regular installs.

The current filenames should become tags at the beginning of each log entry. This this message from github_worker_57738_server.log:

[2021-08-11 12:53:38 -0400] [1222286] [DEBUG] GET /AUGWOP/heartbeat 127.0.0.1 - - [11/Aug/2021:12:53:38 -0400] "GET /AUGWOP/heartbeat HTTP/1.1" 200 19 "-" "python-requests/2.22.0"

becomes in syslog:

[augur] [2021-08-11 12:53:38 -0400] [1222286] [github_worker_57738_server] [DEBUG] GET /AUGWOP/heartbeat
127.0.0.1 - - [11/Aug/2021:12:53:38 -0400] "GET /AUGWOP/heartbeat HTTP/1.1" 200 19 "-" "python-requests/2.22.0"

jberkus avatar Aug 11 '21 16:08 jberkus

ref #1413

jberkus avatar Aug 11 '21 16:08 jberkus

Rodger that. As we chatted yesterday, I think we will refactor logger.py

My thinking is we retain the directory structure in a dev mode (as this is easier for a developer working on a component), and have the default run level pipe it to syslog.

sgoggins avatar Aug 11 '21 22:08 sgoggins