My point was that the writing of the container metadata into Redis itself is not just logging, and that's going to be an important part of the overall system functionality regardless of the log level. The other stuff you moved into the if-block is all needed for that functionality so it should be un-conditional (not based on the log level).