Google Log(glog) Output Format
If your project uses Google Logging module, you would have sometimes wondered what the different fields of the log message mean. Here’s the format of a glog-
[IWEF]yyyymmdd hh:mm:ss.uuuuuu threadid file:line] msg
where
IWEF
— Log Levels, I
for INFO
, W
for WARNING
, E
for ERROR
and `F` for FATAL
.
yyyymmdd
— Year, Month and Date.
hh:mm:ss.uuuuuu
— Hours, Minutes, Seconds and Microseconds.
threadid
— PID/TID of the process/thread.
file
:line
— File name and line number.
msg
— Actual user-specified log message.
Edit: One of my colleagues hit into a corner case because of the missing “year” information in glog. She raised this issue with Google and the fix is now available in the latest version of glog. Hence, the article has been updated to show that glogs now have year info. YMMV depending on the version of glog you use.