[ 
https://issues.apache.org/jira/browse/DISPATCH-76?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14218514#comment-14218514
 ] 

ASF subversion and git services commented on DISPATCH-76:
---------------------------------------------------------

Commit 1640631 from [~tedross] in branch 'dispatch/trunk'
[ https://svn.apache.org/r1640631 ]

DISPATCH-76 - qd_log won't evaluate its arguments unless the log source+level 
is enabled.

> qd_log should not evaluate its arguments if log statement is not enabled.
> -------------------------------------------------------------------------
>
>                 Key: DISPATCH-76
>                 URL: https://issues.apache.org/jira/browse/DISPATCH-76
>             Project: Qpid Dispatch
>          Issue Type: Bug
>          Components: Container
>    Affects Versions: 0.2
>            Reporter: Alan Conway
>            Assignee: Ted Ross
>             Fix For: 0.3
>
>
> The qd_log macro directly calls qd_log_impl which means all the arguments are 
> evaluated reardless of whether or not the statement is actually enabled. This 
> is very very bad, since the arguments may be complex function calls that 
> construct log messages by doing expensive things like parsing AMQP messages 
> etc. This kind of overhead should never be imposed unless the message is 
> actually going to be logged. 
> A qd_log call which is not enabled should do nothing more than the bit flag 
> comparison needed to determine that is not enabled.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to