Skip to content
This repository was archived by the owner on Jun 30, 2025. It is now read-only.

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 #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 subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants