All Downloads are FREE. Search and download functionalities are using the official Maven repository.

pkg.UsingConstantAsFormat Maven / Gradle / Ivy

The newest version!
package pkg;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class UsingConstantAsFormat {
  private final Logger logger = LoggerFactory.getLogger(getClass());
  private static final String CONSTANT = "log message";

  void method() {
    logger.info(CONSTANT);
    LoggerFactory.getLogger(getClass()).info(CONSTANT);
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy