<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 3 December 2014 at 14:22, Daniel Vetter <span dir="ltr"><<a href="mailto:daniel@ffwll.ch" target="_blank">daniel@ffwll.ch</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span>On Tue, Dec 02, 2014 at 05:15:37PM +0000, Thomas Wood wrote:<br>
> diff --git a/lib/igt_core.h b/lib/igt_core.h<br>
> index a258348..5c5ee25 100644<br>
> --- a/lib/igt_core.h<br>
> +++ b/lib/igt_core.h<br>
> @@ -512,16 +512,20 @@ bool igt_run_in_simulation(void);<br>
> void igt_skip_on_simulation(void);<br>
><br>
> /* structured logging */<br>
> +#ifndef IGT_LOG_DOMAIN<br>
> +#define IGT_LOG_DOMAIN (NULL)<br>
> +#endif<br>
<br>
</span>I guess the idea is that different source files have a<br>
<br>
#define IGT_LOG_DOMAIN "foobar"<br>
<br>
at the top before any includes?<br></blockquote><div><br></div><div>Yes, or defined with -D in CFLAGS.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
Would be great if you can add some good defaults as a patch on top:<br>
- For everything in tests/*c I think we should add a suitable define in<br>
the Makefile, perhaps "test"<br></blockquote><div><br>The default domain for a test is the program name.<br><br> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
- Same for tools/ with "tools"<br>
- lib/* should probably have per-file log domains, using the basename of<br>
the source file itself. Dunno whether there's a cool Makefile trick to<br>
make that happen.<br></blockquote><br> The helper library is currently all within the same domain (defined in Makefile.am), but separate domains for different parts of the library would improve the filtering options.<br><div><br> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
With that added I think patches 1-4 are a nice addition to the igt<br>
logging.<br>
-Daniel<br>
--<br>
Daniel Vetter<br>
Software Engineer, Intel Corporation<br>
<a href="tel:%2B41%20%280%29%2079%20365%2057%2048" value="+41793655748" target="_blank">+41 (0) 79 365 57 48</a> - <a href="http://blog.ffwll.ch" target="_blank">http://blog.ffwll.ch</a><br></blockquote></div></div></div>