[libvirt] [PATCH 5/9] Include filename explicitly in logging APIs

Eric Blake eblake at redhat.com
Thu Sep 27 19:53:07 UTC 2012


On 09/27/2012 01:39 PM, Eric Blake wrote:
> On 09/27/2012 10:44 AM, Daniel P. Berrange wrote:
>> From: "Daniel P. Berrange" <berrange at redhat.com>
>>
>> Currently the logging APIs have a 'const char *category' parameter
>> which indicates where the log message comes from. This is typically
>> a combination of the __FILE__ string and other prefix. Split the
>> __FILE__ off into a dedicated parameter so it can passed to the
>> log outputs
>>

>> +    VIR_DEBUG_INT("trace", __FILE__ , __LINE__, __func__,    \
> 
> While you are touching this line, get rid of the space before comma.
> 

> ACK with this squashed in:
> 
> diff --git i/src/internal.h w/src/internal.h
> index 8037a4a..f8d9044 100644
> --- i/src/internal.h
> +++ w/src/internal.h
> @@ -349,10 +349,10 @@
> 
>  #  define PROBE_EXPAND(NAME, ARGS) NAME(ARGS)
>  #  define PROBE(NAME, FMT, ...)                              \
> -    VIR_DEBUG_INT("trace." __FILE__ , __func__, __LINE__,    \
> +    VIR_DEBUG_INT("trace." __FILE__, __func__, __LINE__,     \
>                    #NAME ": " FMT, __VA_ARGS__);              \
> -    if (LIBVIRT_ ## NAME ## _ENABLED()) {                   \

Phooey - I diffed against the wrong patch.  The intent was to fix just
the space before comma, or even to squash that fix into 4/9 (along with
the other whitespace fixes).

-- 
Eric Blake   eblake at redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 617 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20120927/6aecd4e0/attachment-0001.sig>


More information about the libvir-list mailing list