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

Prepend the year to each glog line (#516) #530

Merged
merged 2 commits into from
Mar 25, 2020

Conversation

aesophor
Copy link
Contributor

@aesophor aesophor commented Mar 8, 2020

This PR fixes issue #516 by prepending the year to each glog line.

Previous format of each line in a log file:
[IWEF]mmdd hh:mm:ss.uuuuuu threadid file:line] msg

New format:
[IWEF]yyyymmdd hh:mm:ss.uuuuuu threadid file:line] msg


This is what a log file will actually look like:

Log file created at: 2020/03/08 23:47:32
Running on machine: adagio
Log line format: [IWEF]yyyymmdd hh:mm:ss.uuuuuu threadid file:line] msg
I20200308 23:47:32.089828 400441 config.cc:27] Loading user configuration: /home/aesophor/.config/wmderland/config
I20200309 07:41:46.769781 400441 config.cc:27] Loading user configuration: /home/aesophor/.config/wmderland/config

This PR fixes issue google#516 by prepending the year to each glog line.

Previous format of each line in a log file:
[IWEF]mmdd hh:mm:ss.uuuuuu threadid file:line] msg

New format:
[IWEF]yyyymmdd hh:mm:ss.uuuuuu threadid file:line] msg
Since the format of each glog line has been changed,
the logging_unittest must also be updated.
@vctang
Copy link

vctang commented Mar 11, 2020

Thank you for adding this!!

@sergiud sergiud merged commit 5b4fb63 into google:master Mar 25, 2020
@aesophor aesophor deleted the glog-append-year branch March 25, 2020 11:10
@sergiud sergiud added this to the 0.5 milestone Mar 30, 2021
@sergiud sergiud mentioned this pull request May 6, 2021
davidflanagan pushed a commit to davidflanagan/glog that referenced this pull request Jan 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants