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

pkg.UsingGetLocalizedMessage Maven / Gradle / Ivy

The newest version!
package pkg;

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

public class UsingGetLocalizedMessage {
  private final Logger logger = LoggerFactory.getLogger(getClass());

  void method(Throwable t) {
    logger.info("My message is {}", t.getLocalizedMessage(), t);
    logger.info("My {} is {}", new Object[] {"message", t.getLocalizedMessage(), t});
    logger.info("My {} {} {}", new Object[] {"message", "is", t.getLocalizedMessage(), t});
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy