[sheepdog] [PATCH v3 0/3] logger: selectable log format
Liu Yuan
namei.unix at gmail.com
Wed Jan 30 04:09:22 CET 2013
On 01/29/2013 08:04 PM, Hitoshi Mitake wrote:
> This patch set implements a mechanism for selectable log format in
> logger. Current logger writes log in a fixed format. It is hard to
> parse by machine. So the only wai to read logs is opening them with
> text editors or pagers.
>
> This patch set implements logging in JSON format as an example. So we
> can write programs like pretty printers or state machines on
> them. These might be helpful for debugging and analyzing sheepdog.
>
> This is an example of a log formatted in JSON:
> {"time": "1359367663", "worker_name": "main", "worker_idx": 0, "func":
> "jrnl_recover", "line": 230, "body": "opening the directory
> /store/sheep/journal/"}
>
> A similar log line formatted in default style is like this:
> Jan 28 20:07:52 [main] jrnl_recover(230) opening the directory
> /store/sheep/journal/
>
> (My personal intention is using this feature for debugging shepherd :)
Applied, thanks.
Yuan
More information about the sheepdog
mailing list