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

inconsistent timezones in logger output #4

Open
avrljk opened this issue Feb 13, 2018 · 0 comments
Open

inconsistent timezones in logger output #4

avrljk opened this issue Feb 13, 2018 · 0 comments

Comments

@avrljk
Copy link

avrljk commented Feb 13, 2018

This is relatively minor, but may indicate a config inconsistency and impede debugging later...

The logger output below from the Django container shows an operation that times out 30 secs after the initial GET request.

There are two different timezones, last four digits in the square brackets: "0000" (UTC) and "0800" (UTC+8 == Perth). The first line omits the timezone, but it's +0800 like line two.

django_1    | [13/Feb/2018 17:38:10] INFO    172.19.0.1      root GET /ajax/datafile_list/2/ 200
django_1    | 172.19.0.1 - - [13/Feb/2018:17:38:10 +0800] "GET /ajax/datafile_list/2/ HTTP/1.1" 200 2018 "http://localhost:8000/dataset/2" "Mozilla/5.0 (X11; Linux x86_64; rv:58.0) Gecko/20100101 Firefox/58.0"
django_1    | [2018-02-13 09:38:48 +0000] [1] [CRITICAL] WORKER TIMEOUT (pid:90)
django_1    | [2018-02-13 09:38:49 +0000] [391] [INFO] Booting worker with pid: 391

The date separators differ too, suggesting different locale settings (in different processes?).

If this is an inconsistency in a configurable environment or config setting (TZ, locale, etc), making it uniform will help with debugging (grep for a particular time/interval), automated log scanning, etc.

If it's hardcoded in the software doing the logging (ctime() versus asctime(gmtime()) there may be little we can do. Unsetting TZ in the environment will displayed times consistently, but as UTC, rather then a more intuitive local time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant