richard.herbert
06/13/2023, 2:52 PM<http://log.info|log.info>()
surrounded by a log.canInfo()
has been noted as no longer required in the ColdBox 7 release notes.
Is this a feature of ColdBox 7 or LogBox 7, for sites that don't use ColdBox?aliaspooryorik
<http://log.info|log.info>( "This is a log message", data );
even when info was disabled. The advantage of doing:
if( log.canInfo() ){
<http://log.info|log.info>( "This is a log message", data );
}
Was so that you could not run that bit of code if it was expensive to do so.richard.herbert
06/13/2023, 3:21 PMif it was expensive to do soYes, that's what I've always understood but not really understood what "_expensive_" actually meant. I assume they've managed to remove the expense but has that been achieved at the ColdBox end, as referenced, or the LogBox end, not mentioned in the docs.
aliaspooryorik
aliaspooryorik
aliaspooryorik
elpete
06/13/2023, 3:23 PMaliaspooryorik
elpete
06/13/2023, 3:24 PMaliaspooryorik
<http://log.info|log.info>( () => "This is a log message", data )
which does not call the anonymous function if logging is not enabled.aliaspooryorik
richard.herbert
06/13/2023, 3:38 PM