Java Code Examples for org.slf4j.Logger.getName()

The following are Jave code examples for showing how to use getName() of the org.slf4j.Logger class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
+ Save this method
Example 1
Project: incubator-ratis   File: LogUtils.java   View Source Code Vote up 5 votes
static void setLogLevel(Logger logger, Level level) {
  final String name = logger.getName();
  if (LOG.isTraceEnabled()) {
    LOG.trace("", new Throwable("Set " + name + " log level to " + level));
  } else {
    LOG.info("Set {} log level to {}", name, level);
  }
  LogManager.getLogger(name).setLevel(level);
}
 
Example 2
Project: cf-mta-deploy-service   File: StepsUtil.java   View Source Code Vote up 4 votes
private static String getPrefix(Logger logger) {
    String name = logger.getName();
    return "[" + name.substring(name.lastIndexOf('.') + 1) + "] ";
}
 
Example 3
Project: cf-mta-deploy-service   File: StepLogger.java   View Source Code Vote up 4 votes
private static String getPrefix(Logger logger) {
    String name = logger.getName();
    return "[" + name.substring(name.lastIndexOf('.') + 1) + "] ";
}
 
Example 4
Project: mynlp   File: Slf4JLogger.java   View Source Code Vote up 4 votes
Slf4JLogger(Logger logger) {
    super(logger.getName());
    this.logger = logger;
}