• quiche's avatar
    Update syslog parser for new ChromeOS log format · 1a2f0e08
    quiche authored
    In R39, ChromeOS rsyslogd no longer includes the hostname
    field. Update SyslogParser accordingly.
    
    While there:
    - Update example shill log message to include process ID.
      (ChromeOS syslog recently started recording process IDs
      whenever possible.)
    - Add a test log message from the kernel. This message does
      not include a process ID.
    - Fix parsing of messages that do not have a process ID.
      Previously, for such messages, the process name would include
      a trailing ':'. With this change, they no longer do. (The
      process name will now be 'kernel', instead of 'kernel:'.)
    - Simplify string EXPECTations. (No need for cstr() and STREQ.)
    
    BUG=403558
    TEST=unit test (ExtensionSyslogParserTest.ParseLog)
    
    Review URL: https://codereview.chromium.org/486873005
    
    Cr-Commit-Position: refs/heads/master@{#292058}
    1a2f0e08
syslog_parser.cc 3.35 KB