[sheepdog] [PATCH v2 1/4] logger: add a mechanism for initializing log file with user specified callbacks

Hitoshi Mitake mitake.hitoshi at gmail.com
Tue Feb 5 05:17:48 CET 2013


At Tue, 05 Feb 2013 11:01:57 +0800,
Liu Yuan wrote:
> 
> On 02/05/2013 10:49 AM, Hitoshi Mitake wrote:
> > After applying this patch, a first log line produced by sheep will be
> > like this:
> > { "type": 0, "header": { "program": "sheep", "pid": 2500, "port":
> > 7000} }
> 
> I think we'd better print the information necessary. So I guess you only
> need "port" field.
> 
> isn't it simpler for json_formatter to inline "port" into every log
> message? Then I guess both sheep and json_log_viewer.py will get
> simplified a lot.
> 

Currently json_log_viewer.py is an only user of JSON format. But we
can write other scripts which want logs to be formatted in JSON. And
they might want pid or other information which is not included in
current header.

So I believe current header + successor format is suitable.

Thanks,
Hitoshi



More information about the sheepdog mailing list