is there another way to only inject a logger in debug mode?