Re: [PATCH weston v2 2/2] compositor: Implement JSON-timeline logging

2014-12-08 Thread Pekka Paalanen
On Thu, 4 Dec 2014 13:23:57 +0200 Pekka Paalanen wrote: > On Tue, 02 Dec 2014 12:12:28 -0800 > Bill Spitzak wrote: > > > On 12/02/2014 05:45 AM, Pekka Paalanen wrote: > > > From: Pekka Paalanen > > > > > + if (!s->get_label || s->get_label(s, d, sizeof(d)) < 0) { > > > + d[0] = '\0';

Re: [PATCH weston v2 2/2] compositor: Implement JSON-timeline logging

2014-12-05 Thread Pekka Paalanen
On Thu, 04 Dec 2014 12:46:33 +0100 sardemff7+wayl...@sardemff7.net wrote: > On 2014-12-04 12:23, Pekka Paalanen wrote: > > On Tue, 02 Dec 2014 12:12:28 -0800 > > Bill Spitzak wrote: > >> I think you should make an emit(FILE*, const char*) function that prints > >> a quoted string or null, instead

Re: [PATCH weston v2 2/2] compositor: Implement JSON-timeline logging

2014-12-04 Thread sardemff7+wayland
On 2014-12-04 12:23, Pekka Paalanen wrote: On Tue, 02 Dec 2014 12:12:28 -0800 Bill Spitzak wrote: I think you should make an emit(FILE*, const char*) function that prints a quoted string or null, instead of doing this repeatedly. Such a function could also convert non-printable characters to es

Re: [PATCH weston v2 2/2] compositor: Implement JSON-timeline logging

2014-12-04 Thread Pekka Paalanen
On Tue, 02 Dec 2014 12:12:28 -0800 Bill Spitzak wrote: > On 12/02/2014 05:45 AM, Pekka Paalanen wrote: > > From: Pekka Paalanen > > > + if (!s->get_label || s->get_label(s, d, sizeof(d)) < 0) { > > + d[0] = '\0'; > > + q = ""; > > + } > > + > > + fprintf(ctx->out, "{ \

Re: [PATCH weston v2 2/2] compositor: Implement JSON-timeline logging

2014-12-02 Thread Bill Spitzak
On 12/02/2014 05:45 AM, Pekka Paalanen wrote: From: Pekka Paalanen + if (!s->get_label || s->get_label(s, d, sizeof(d)) < 0) { + d[0] = '\0'; + q = ""; + } + + fprintf(ctx->out, "{ \"id\":%u, " + "\"type\":\"weston_surface\", " +

[PATCH weston v2 2/2] compositor: Implement JSON-timeline logging

2014-12-02 Thread Pekka Paalanen
From: Pekka Paalanen Logging is activated and deactivated with the debug key binding 't'. When activated, it creates a new log file, where it records the events. The log file contains events and detailed object information entries in JSON format, and is meant to be parsed in sequence from beginni