Visa denna sidaEditera denna sidaLås denna sidaLänkar till denna sidaBilagor till denna sidaHistorik för denna sidaSwikins toppSenaste ändringarSök i SwikinHjälpguide

Small improvement over logging's performance

We made a small change to the logger, so you can write
Q2Log debug: ['Popped ', msgList size asString, ' emails.']
instead of
Q2Log debug: 'Popped ', msgList size asString, ' emails.'
if you load this FasterLogging.cs.

In the first case your debug message won't be evaluated, when the globalMaxLevel is lower than debug or there are no log emitters. This of course holds not only for #debug:, but all the logging messages. We found that plain string literals don't worth to be encapsulated, but all the others do.