本文整理汇总了Java中org.jnetpcap.util.config.JConfig.init方法的典型用法代码示例。如果您正苦于以下问题:Java JConfig.init方法的具体用法?Java JConfig.init怎么用?Java JConfig.init使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.jnetpcap.util.config.JConfig
的用法示例。
在下文中一共展示了JConfig.init方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getLogger
import org.jnetpcap.util.config.JConfig; //导入方法依赖的package包/类
/**
* Gets the logger.
*
* @param c
* the c
* @return the logger
*/
public static Logger getLogger(Class<?> c) {
if (triggerConfigInit && c != JConfig.class) {
/*
* This is needed because of the timing. JConfig reloads the logger
* properties and causes all prior initialization to be lost. So we
* basically trigger the JConfig initialization on the first getLogger
* request. If JConfig has already been initialized some other means, it
* won't do it again, but since we don't know we call its init method, the
* first time we do anyway. JConfig also preserves its own level, so
*/
triggerConfigInit = false;
JConfig.init();
}
return getLogger(c.getName());
}
示例2: setLevel
import org.jnetpcap.util.config.JConfig; //导入方法依赖的package包/类
/**
* Sets the level.
*
* @param newLevel
* the new level
* @throws SecurityException
* the security exception
* @see java.util.logging.Logger#setLevel(java.util.logging.Level)
*/
@Override
public void setLevel(Level newLevel) throws SecurityException {
super.setLevel(newLevel);
if (triggerConfigInit) {
triggerConfigInit = false;
JConfig.init();
}
}