Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Standardize and normalize logging #2

Open
dspruell opened this issue Sep 19, 2017 · 0 comments
Open

Standardize and normalize logging #2

dspruell opened this issue Sep 19, 2017 · 0 comments
Labels

Comments

@dspruell
Copy link
Contributor

As currently implemented, logging in the application is a mish-mash and haphazardly results in different log formats from various packages and modules intermixed in the log stream.

e.g. the first lines at startup are from the app, using one format, and subsequent lines are from Gunicorn using a different format.

$ ./venv.d/ampt-manager/bin/ampt-manager run -l info ./ampt/ampt_manager.conf
2017-09-18 20:01:58,646: [INFO] Starting AMPT Manager
2017-09-18 20:01:58,646: [INFO] Configuring server for TLS using PROTOCOL_TLSv1_2 and cipher set TLSv1 (OpenSSL 1.0.2l  25 May 2017)
[2017-09-18 20:01:58 -0700] [12228] [INFO] Starting gunicorn 19.7.1
[2017-09-18 20:01:58 -0700] [12228] [INFO] Listening at: https://127.0.0.1:8443 (12228)
[2017-09-18 20:01:58 -0700] [12228] [INFO] Using worker: sync
[2017-09-18 20:01:58 -0700] [12231] [INFO] Booting worker with pid: 12231
[2017-09-18 20:01:58 -0700] [12232] [INFO] Booting worker with pid: 12232
[2017-09-18 20:01:58 -0700] [12233] [INFO] Booting worker with pid: 12233
[2017-09-18 20:01:58 -0700] [12234] [INFO] Booting worker with pid: 12234
[2017-09-18 20:01:58 -0700] [12235] [INFO] Booting worker with pid: 12235
...
[2017-09-18 20:01:33 -0700] [11155] [INFO] Handling signal: int
[2017-09-18 20:01:34 -0700] [11160] [INFO] Worker exiting (pid: 11160)
[2017-09-18 20:01:34 -0700] [11161] [INFO] Worker exiting (pid: 11161)
[2017-09-18 20:01:34 -0700] [11159] [INFO] Worker exiting (pid: 11159)
[2017-09-18 20:01:34 -0700] [11158] [INFO] Worker exiting (pid: 11158)
[2017-09-18 20:01:34 -0700] [11162] [INFO] Worker exiting (pid: 11162)
[2017-09-18 20:01:34 -0700] [11155] [INFO] Shutting down: Master

e.g. a resize of the terminal the manager is running in drops this INFO logging:

[2017-09-18 18:02:52 -0700] [11155] [INFO] Handling signal: winch                                                      

e.g. logging sent to stdio logging from Gunicorn doesn't go to the ampt.log.

@dspruell dspruell added the bug label Sep 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant