What is the format of the log prefix in chrome_debug.log?

I have configured google-chrome to dump the debug log to the chrome_debug.log

user-data-dir directory
.

This is handy for debugging some of our more dumb browser problems. However, I'm having some timeout issues, so I'm trying to figure out what the prefix in the log lines means. Since this magazine is from today (June 11th), I will assume that "0611" is today. I'm assuming "/ 053512" after that is the timestamp in seconds?

[296:296:0611/053512:VERBOSE1:password_store_factory.cc(276)] Password storage detected desktop environment: (unknown)
[296:296:0611/053512:WARNING:password_store_factory.cc(322)] Using basic (unencrypted) store for password storage. See http://code.google.com/p/chromium/wiki/LinuxPasswordStorage for more information about password storage options.
[296:296:0611/053512:VERBOSE1:render_process_host_impl.cc(687)] Mojo Channel is enabled on host
[6:6:0611/053512:VERBOSE1:sandbox_linux.cc(68)] Activated seccomp-bpf sandbox for process type: renderer.
[6:6:0611/053512:VERBOSE1:child_thread_impl.cc(321)] Mojo is enabled on child
[6:6:0611/053527:INFO:child_thread_impl.cc(725)] ChildThreadImpl::EnsureConnected()
[296:318:0611/053611:VERBOSE1:chrome_browser_main_posix.cc(216)] Handling shutdown for signal 15.

      

Better yet would be a pointer to where the code is generating the prefix. As I suspect it has changed (I am running chrome v43.0.x, on Debian Linux).

doc says:

Template parameters, enclosed in parentheses on each line, have the format:

[process_id: thread_id: ticks_in_microseconds: log_level: filename (line_number)]

But "0611/053512" is pretty clearly not "ticks_in_microseconds".

+3


source to share


1 answer


The Chrome base / logging.cc to LogMessage::Init

determine the contents of the log prefix chrome_debug.log. The timestamp part is defined as follows:

struct tm* tm_time = &local_time;
stream_ << std::setfill('0')
        << std::setw(2) << 1 + tm_time->tm_mon
        << std::setw(2) << tm_time->tm_mday
        << '/'
        << std::setw(2) << tm_time->tm_hour
        << std::setw(2) << tm_time->tm_min
        << std::setw(2) << tm_time->tm_sec
        << ':';

      



So: mmDD / HHMMSS (month, day, /, hour, minute, second).

Thus, the difference between the two time stamps "0611/053512" and "0611/053611" is not 99 seconds, but 59 seconds.

+2


source







All Articles