In Java Development, we did debug checking before logging a time / memory consuming operation.
for example:
if(log.isDebugEnabled()){
log.debug("This is time / memory consuming {}", bigString);
}
with Erlang Lager, Do I need to do the same check before logging it?
If yes, how to check this?
With lager, you can change desired log level with lager configuration, so you can omit any check in the code. If debug level is not enabled for any backend, it will be just dropped
See example
So debug logs will only go to
debug.log