On Fri, 20 Jul 2018 20:03:27 +0100
Daniel Stone <[email protected]> wrote:

> From: Pekka Paalanen <[email protected]>
> 
> This registers a new weston-debug scope "log" through which one can get
> live log output interspersed with possible other debugging prints.
> 
> Signed-off-by: Pekka Paalanen <[email protected]>
> 
> pass the log_scope to weston_debug_scope_timestamp API to append
> the scope name to the timestamp
> 
> Signed-off-by: Maniraj Devadoss <[email protected]>
> Reviewed-by: Pekka Paalanen <[email protected]>
> Reviewed-by: Daniel Stone <[email protected]>
> ---
>  compositor/main.c | 22 ++++++++++++++++++++++
>  1 file changed, 22 insertions(+)
> 
> diff --git a/compositor/main.c b/compositor/main.c
> index 2f34e1115..eaf4cf381 100644
> --- a/compositor/main.c
> +++ b/compositor/main.c

> @@ -2490,6 +2508,9 @@ int main(int argc, char *argv[])
>       }
>       segv_compositor = wet.compositor;
>  
> +     log_scope = weston_compositor_add_debug_scope(wet.compositor, "log",
> +                     "Weston and Wayland log\n", NULL, NULL);
> +
>       if (debug_protocol)
>               weston_compositor_enable_debug_protocol(wet.compositor);
>  
> @@ -2602,6 +2623,7 @@ out:
>       /* free(NULL) is valid, and it won't be NULL if it's used */
>       free(wet.parsed_options);
>  
> +     weston_debug_scope_destroy(log_scope);

Maybe log_scope should be set to NULL again, in case
weston_compositor_destroy() logs something.

>       weston_compositor_destroy(wet.compositor);
>  
>  out_signals:

Otherwise still good.


Thanks,
pq

Attachment: pgpNbPCx2MNEn.pgp
Description: OpenPGP digital signature

_______________________________________________
wayland-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to