joseflauzino commented on PR #6357:
URL: https://github.com/apache/cloudstack/pull/6357#issuecomment-1215072881

   Hi @DaanHoogland, sorry for the delay in responding.
   
   Regarding your suggested code changes:
   In these particular code snippets, I have a preference for not using the 
`isDebugEnabled()` check.
   
   The main reason is that this check can provide a significant performance 
improvement only when the message construction is very costly, which I don't 
think is the case. In these snippets, the messages are built by the 
concatenation of strings (no need for expensive calculations or processing).
   
   Also, if the logger is enabled at the debug level, it incurs the cost of 
evaluating whether the logger is enabled or not twice: once in 
`isDebugEnabled()` and once in `debug()`. Since it is very common for ACS users 
to leave the logger enabled for the debug level  (because of the useful 
messages for troubleshoting), I don't think it is worth doing this check 
(especially with simple strings).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to