We should rewrite our log messages to make use of that because:
That is how the API is supposed to be used
Not doing so causes unnecessary string allocations (strings are immutable and hence cannot change). A template string therefore allocates a new string every time it is constructed. If the log level (f.e. TRACE) is not enabled, then the message was unnecessarily constructed.
PR https://github.com/coblox/bobtimus/pull/55 introduced log4js into the codebase.
log4js
is more powerful thandebug
and supports arbitrary parameters to its log-fn calls: https://github.com/log4js-node/log4js-node/blob/master/examples/example.js#L38We should rewrite our log messages to make use of that because: