tstack/lnav — pull request #49 by mdordal (2013-05-17 22:12:44+00:00)
Title: Add support for glog logs

Glog[0] is an open source logging framework for C++. Add some support in lnav for it.

The basic line structure is:
` :] `
Some examples[1] follow.

This also adds support for the sql queries, with the additional columns `glog_level`, `timestamp`, `thread`, `file`, and `message`.

Glog supports more error levels than lnav (specifically: fatal), so preserving glog_level may be useful. Furthermore, the glog timestamps include microseconds, which would otherwise get truncated.

Testing: run on an example log, do filters and some sql.

[0]: http://google-glog.googlecode.com/svn/trunk/doc/glog.html

Since I wasn't able to find any examples, here's some output from the glog unit tests:
```
E0517 15:04:22.619632 1952452992 logging_unittest.cc:253] Log every 3, iteration 19
I0517 15:04:22.619642 1952452992 logging_unittest.cc:259] Log if every 1, iteration 19
I0517 15:04:22.619740 1952452992 logging_unittest.cc:259] Log if every 1, iteration 20
W0517 15:04:22.619751 1952452992 logging_unittest.cc:263] log_if this
I0517 15:04:22.619760 1952452992 logging_unittest.cc:267] array
I0517 15:04:22.619768 1952452992 logging_unittest.cc:269] const array
E0517 15:04:22.619776 1952452992 logging_unittest.cc:271] foo 1000 0000001000 3e8
```