qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alan Conway (JIRA)" <j...@apache.org>
Subject [jira] [Created] (DISPATCH-76) qd_log should not evaluate its arguments if log statement is not enabled.
Date Wed, 19 Nov 2014 16:44:34 GMT
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: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org


Mime
View raw message