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

write timezone (in our case: always "UTC") in log messages #11893

Merged
merged 2 commits into from Jul 25, 2017
Merged

write timezone (in our case: always "UTC") in log messages #11893

merged 2 commits into from Jul 25, 2017

Conversation

patrickbr
Copy link
Contributor

This PR adds e (see http://php.net/manual/en/function.date.php) to the Monolog date format. Since Piwik uses "UTC" as the default timezone, this will always add " UTC" to the end of the date string. Log lines will look like this:

WARNING Referrers[2017-07-24 18:04:14 UTC] Some message

This resolves problems with external tools reading the Piwik log. Previously, these tools assumed that the time was displayed in the system timezone. (See for example #2888 (comment) and #11888).

@mattab
Copy link
Member

mattab commented Jul 24, 2017

Thanks for the PR!

in log file it is generally using the timezone abbreviation so let's use T instead of e as e would lead to long timezones like Pacific/Auckland whereas T shows NZST

@patrickbr
Copy link
Contributor Author

You are right, I should've read a few more lines of the date format character list. I was not aware of T :)

@mattab mattab merged commit 3b6c895 into matomo-org:3.x-dev Jul 25, 2017
@mattab mattab added the c: Usability For issues that let users achieve a defined goal more effectively or efficiently. label Sep 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: Usability For issues that let users achieve a defined goal more effectively or efficiently.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants