Log debug messages only in DEBUG configuration.