# Allow for closure of first argument to `logMessage`

## Description

Rather than having to wrap debug and info logs with `canDebug`, allow the first argument of `logMessage` to be a closure, which would not be evaluated until the `canLog` check is performed in the method. At that point, if a closure is detected it will be evaluated to its return string.

## Activity

Show:
Luis Majano
March 4, 2021, 2:50 PM

I like this! The only downside is that the closure brings in their environment, so I am assuming it will be much much slower due to that internal CF behavior. thoughts?

Luis Majano

Jon Clausen

None

Minor