You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Ted Ross (JIRA)" <ji...@apache.org> on 2014/11/19 22:19:34 UTC

[jira] [Resolved] (DISPATCH-76) qd_log should not evaluate its arguments if log statement is not enabled.

     [ https://issues.apache.org/jira/browse/DISPATCH-76?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ted Ross resolved DISPATCH-76.
------------------------------
    Resolution: Fixed

> 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: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org