本文整理汇总了Java中org.apache.logging.log4j.Logger.getName方法的典型用法代码示例。如果您正苦于以下问题:Java Logger.getName方法的具体用法?Java Logger.getName怎么用?Java Logger.getName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.logging.log4j.Logger
的用法示例。
在下文中一共展示了Logger.getName方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: DeprecationLogger
import org.apache.logging.log4j.Logger; //导入方法依赖的package包/类
/**
* Creates a new deprecation logger based on the parent logger. Automatically
* prefixes the logger name with "deprecation", if it starts with "org.elasticsearch.",
* it replaces "org.elasticsearch" with "org.elasticsearch.deprecation" to maintain
* the "org.elasticsearch" namespace.
*/
public DeprecationLogger(Logger parentLogger) {
String name = parentLogger.getName();
if (name.startsWith("org.elasticsearch")) {
name = name.replace("org.elasticsearch.", "org.elasticsearch.deprecation.");
} else {
name = "deprecation." + name;
}
this.logger = LogManager.getLogger(name);
}
示例2: LogWriterLogger
import org.apache.logging.log4j.Logger; //导入方法依赖的package包/类
private LogWriterLogger(final Logger logger, final String connectionName,
final boolean isSecure) {
super((AbstractLogger) logger, logger.getName(), logger.getMessageFactory());
this.logWrapper = this;
this.connectionName = connectionName;
this.loggerName = getName();
this.isSecure = isSecure;
}
示例3: getLogger
import org.apache.logging.log4j.Logger; //导入方法依赖的package包/类
public static Logger getLogger(String prefix, Logger logger) {
return new PrefixLogger((ExtendedLogger)logger, logger.getName(), prefix);
}
示例4: CsapEventClientLogUnwind
import org.apache.logging.log4j.Logger; //导入方法依赖的package包/类
private CsapEventClientLogUnwind(final Logger logger) {
super((AbstractLogger) logger, logger.getName(), logger.getMessageFactory());
this.logger = this;
}
示例5: FastLogger
import org.apache.logging.log4j.Logger; //导入方法依赖的package包/类
public FastLogger(final Logger logger) {
this((ExtendedLogger) logger, logger.getName(), logger.getMessageFactory());
}
示例6: Log4J2Logger
import org.apache.logging.log4j.Logger; //导入方法依赖的package包/类
Log4J2Logger(Logger logger) {
super((ExtendedLogger) logger, logger.getName(), logger.getMessageFactory());
}