That&#x27;s a solved problem. Your logger should be capable of formatting on it&#x27;s own, and take the arguments to the format string as variadic arguments. This is how Java&#x27;s ubiquitous SLF4J interface is defined. If the log level isn&#x27;t low enough, then the arguments are tossed but never composited.