本文整理匯總了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());
}