Class Logr

java.lang.Object
de.galan.commons.logging.Logr

public class Logr extends Object
Returns the Log4j2 logger for the calling class (for Slf4j use Slogr). Can be used to determine the Logger, reduces errors when copy&paste.
Note: Compareable to Log4j2 LogManager.getLogger();
  • Constructor Details

    • Logr

      public Logr()
  • Method Details

    • get

      public static org.apache.logging.log4j.Logger get()
      To be used to get the Log4j2 Logger in a class, eg. private final static Logger LOG = Logr.get();. To avoid the Logger declaration completely, use the class Say.