public class FooService { private static final Logger LOGGER = LoggerFactory.getLogger(FooService.class); public void sayHello() { LOGGER.warn("Congratulations, you are pregnant!"); } }