Alan Conway created DISPATCH-76:
-----------------------------------

             Summary: 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: Alan Conway


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