CP-5961

A simple change to make sure DEBUG level logs will only get printed in debug mode running as a foreground process instead of daemon.