it.unimi.dsi.Util.ensureLog4JIsConfigured()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(4.6k)|赞(0)|评价(0)|浏览(185)

本文整理了Java中it.unimi.dsi.Util.ensureLog4JIsConfigured()方法的一些代码示例,展示了Util.ensureLog4JIsConfigured()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Util.ensureLog4JIsConfigured()方法的具体详情如下:
包路径:it.unimi.dsi.Util
类名称:Util
方法名:ensureLog4JIsConfigured

Util.ensureLog4JIsConfigured介绍

[英]Ensures that Log4J is configured, by invoking, if necessary, org.apache.log4j.BasicConfigurator#configure(), and setting the root logger level to Level#INFO.
[中]如有必要,通过调用org确保配置了Log4J。阿帕奇。log4j。BasicConfigurator#configure(),并将根记录器级别设置为#INFO。

代码示例

代码示例来源:origin: blazegraph/database

/** Ensures that Log4J is configured, by invoking, if necessary,
 * {@link org.apache.log4j.BasicConfigurator#configure()}, and
 * setting the root logger level to {@link Level#INFO}.
 */

public static void ensureLog4JIsConfigured() {
  ensureLog4JIsConfigured( null, Level.INFO );
}

代码示例来源:origin: blazegraph/database

/** Ensures that Log4J is configured, by invoking, if necessary,
 * {@link org.apache.log4j.BasicConfigurator#configure()}, and
 * setting the root logger level to a specified logging level.
 * 
 * @param level the required logging level.
 */

public static void ensureLog4JIsConfigured( final Level level ) {
  ensureLog4JIsConfigured( null, level );
}

代码示例来源:origin: com.blazegraph/dsi-utils

/** Ensures that Log4J is configured, by invoking, if necessary,
 * {@link org.apache.log4j.BasicConfigurator#configure()}, and
 * setting the root logger level to {@link Level#INFO}.
 */

public static void ensureLog4JIsConfigured() {
  ensureLog4JIsConfigured( null, Level.INFO );
}

代码示例来源:origin: blazegraph/database

/** Ensures that Log4J is configured, by invoking, if necessary,
 * {@link org.apache.log4j.BasicConfigurator#configure()}, and
 * setting the root logger level to {@link Level#INFO}.
 * 
 * @param klass the calling class (to be shown to the user). 
 */

public static void ensureLog4JIsConfigured( final Class<?> klass ) {
  ensureLog4JIsConfigured( klass, Level.INFO );
}

代码示例来源:origin: com.blazegraph/dsi-utils

/** Ensures that Log4J is configured, by invoking, if necessary,
 * {@link org.apache.log4j.BasicConfigurator#configure()}, and
 * setting the root logger level to a specified logging level.
 * 
 * @param level the required logging level.
 */

public static void ensureLog4JIsConfigured( final Level level ) {
  ensureLog4JIsConfigured( null, level );
}

代码示例来源:origin: com.blazegraph/dsi-utils

/** Ensures that Log4J is configured, by invoking, if necessary,
 * {@link org.apache.log4j.BasicConfigurator#configure()}, and
 * setting the root logger level to {@link Level#INFO}.
 * 
 * @param klass the calling class (to be shown to the user). 
 */

public static void ensureLog4JIsConfigured( final Class<?> klass ) {
  ensureLog4JIsConfigured( klass, Level.INFO );
}

代码示例来源:origin: blazegraph/database

/** Calls Log4J's {@link Logger#getLogger(java.lang.Class)} method and then {@link #ensureLog4JIsConfigured()} with argument {@link Level#DEBUG}.
 * 
 * @param klass a class that will be passed to {@link Logger#getLogger(java.lang.Class)}.
 * @return the logger returned by {@link Logger#getLogger(java.lang.Class)}.
 */

public static Logger getDebugLogger( final Class<?> klass ) {
  Logger logger = Logger.getLogger( klass );
  ensureLog4JIsConfigured( klass, Level.DEBUG );
  return logger;
}

代码示例来源:origin: blazegraph/database

/** Calls Log4J's {@link Logger#getLogger(java.lang.Class)} method and then {@link #ensureLog4JIsConfigured()}.
 * 
 * @param klass a class that will be passed to {@link Logger#getLogger(java.lang.Class)}.
 * @return the logger returned by {@link Logger#getLogger(java.lang.Class)}.
 */

public static Logger getLogger( final Class<?> klass ) {
  Logger logger = Logger.getLogger( klass );
  ensureLog4JIsConfigured( klass );
  return logger;
}

代码示例来源:origin: com.blazegraph/dsi-utils

/** Calls Log4J's {@link Logger#getLogger(java.lang.Class)} method and then {@link #ensureLog4JIsConfigured()}.
 * 
 * @param klass a class that will be passed to {@link Logger#getLogger(java.lang.Class)}.
 * @return the logger returned by {@link Logger#getLogger(java.lang.Class)}.
 */

public static Logger getLogger( final Class<?> klass ) {
  Logger logger = Logger.getLogger( klass );
  ensureLog4JIsConfigured( klass );
  return logger;
}

代码示例来源:origin: com.blazegraph/dsi-utils

/** Calls Log4J's {@link Logger#getLogger(java.lang.Class)} method and then {@link #ensureLog4JIsConfigured()} with argument {@link Level#DEBUG}.
 * 
 * @param klass a class that will be passed to {@link Logger#getLogger(java.lang.Class)}.
 * @return the logger returned by {@link Logger#getLogger(java.lang.Class)}.
 */

public static Logger getDebugLogger( final Class<?> klass ) {
  Logger logger = Logger.getLogger( klass );
  ensureLog4JIsConfigured( klass, Level.DEBUG );
  return logger;
}

代码示例来源:origin: it.unimi.dsi/mg4j-big

throw new IllegalArgumentException( "You specify either a title or a URI output file" );
Util.ensureLog4JIsConfigured();

代码示例来源:origin: it.unimi.dsi/mg4j

throw new IllegalArgumentException( "You specify either a title or a URI output file" );
Util.ensureLog4JIsConfigured();

相关文章