本文整理了Java中java.util.logging.LogManager.addToFamilyTree()
方法的一些代码示例,展示了LogManager.addToFamilyTree()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。LogManager.addToFamilyTree()
方法的具体详情如下:
包路径:java.util.logging.LogManager
类名称:LogManager
方法名:addToFamilyTree
暂无
代码示例来源:origin: robovm/robovm
/**
* Add a given logger into the hierarchical namespace. The
* {@code Logger.addLogger()} factory methods call this method to add newly
* created Logger. This returns false if a logger with the given name has
* existed in the namespace
* <p>
* Note that the {@code LogManager} may only retain weak references to
* registered loggers. In order to prevent {@code Logger} objects from being
* unexpectedly garbage collected it is necessary for <i>applications</i>
* to maintain references to them.
* </p>
*
* @param logger
* the logger to be added.
* @return true if the given logger is added into the namespace
* successfully, false if the given logger exists in the namespace.
*/
public synchronized boolean addLogger(Logger logger) {
String name = logger.getName();
if (loggers.get(name) != null) {
return false;
}
addToFamilyTree(logger, name);
loggers.put(name, logger);
logger.setManager(this);
return true;
}
代码示例来源:origin: com.jtransc/jtransc-rt
public synchronized boolean addLogger(Logger logger) {
String name = logger.getName();
if (loggers.get(name) != null) return false;
addToFamilyTree(logger, name);
loggers.put(name, logger);
logger.setManager(this);
return true;
}
代码示例来源:origin: MobiVM/robovm
/**
* Add a given logger into the hierarchical namespace. The
* {@code Logger.addLogger()} factory methods call this method to add newly
* created Logger. This returns false if a logger with the given name has
* existed in the namespace
* <p>
* Note that the {@code LogManager} may only retain weak references to
* registered loggers. In order to prevent {@code Logger} objects from being
* unexpectedly garbage collected it is necessary for <i>applications</i>
* to maintain references to them.
* </p>
*
* @param logger
* the logger to be added.
* @return true if the given logger is added into the namespace
* successfully, false if the given logger exists in the namespace.
*/
public synchronized boolean addLogger(Logger logger) {
String name = logger.getName();
if (loggers.get(name) != null) {
return false;
}
addToFamilyTree(logger, name);
loggers.put(name, logger);
logger.setManager(this);
return true;
}
代码示例来源:origin: ibinti/bugvm
/**
* Add a given logger into the hierarchical namespace. The
* {@code Logger.addLogger()} factory methods call this method to add newly
* created Logger. This returns false if a logger with the given name has
* existed in the namespace
* <p>
* Note that the {@code LogManager} may only retain weak references to
* registered loggers. In order to prevent {@code Logger} objects from being
* unexpectedly garbage collected it is necessary for <i>applications</i>
* to maintain references to them.
* </p>
*
* @param logger
* the logger to be added.
* @return true if the given logger is added into the namespace
* successfully, false if the given logger exists in the namespace.
*/
public synchronized boolean addLogger(Logger logger) {
String name = logger.getName();
if (loggers.get(name) != null) {
return false;
}
addToFamilyTree(logger, name);
loggers.put(name, logger);
logger.setManager(this);
return true;
}
代码示例来源:origin: com.mobidevelop.robovm/robovm-rt
/**
* Add a given logger into the hierarchical namespace. The
* {@code Logger.addLogger()} factory methods call this method to add newly
* created Logger. This returns false if a logger with the given name has
* existed in the namespace
* <p>
* Note that the {@code LogManager} may only retain weak references to
* registered loggers. In order to prevent {@code Logger} objects from being
* unexpectedly garbage collected it is necessary for <i>applications</i>
* to maintain references to them.
* </p>
*
* @param logger
* the logger to be added.
* @return true if the given logger is added into the namespace
* successfully, false if the given logger exists in the namespace.
*/
public synchronized boolean addLogger(Logger logger) {
String name = logger.getName();
if (loggers.get(name) != null) {
return false;
}
addToFamilyTree(logger, name);
loggers.put(name, logger);
logger.setManager(this);
return true;
}
代码示例来源:origin: com.bugvm/bugvm-rt
/**
* Add a given logger into the hierarchical namespace. The
* {@code Logger.addLogger()} factory methods call this method to add newly
* created Logger. This returns false if a logger with the given name has
* existed in the namespace
* <p>
* Note that the {@code LogManager} may only retain weak references to
* registered loggers. In order to prevent {@code Logger} objects from being
* unexpectedly garbage collected it is necessary for <i>applications</i>
* to maintain references to them.
* </p>
*
* @param logger
* the logger to be added.
* @return true if the given logger is added into the namespace
* successfully, false if the given logger exists in the namespace.
*/
public synchronized boolean addLogger(Logger logger) {
String name = logger.getName();
if (loggers.get(name) != null) {
return false;
}
addToFamilyTree(logger, name);
loggers.put(name, logger);
logger.setManager(this);
return true;
}
代码示例来源:origin: com.gluonhq/robovm-rt
/**
* Add a given logger into the hierarchical namespace. The
* {@code Logger.addLogger()} factory methods call this method to add newly
* created Logger. This returns false if a logger with the given name has
* existed in the namespace
* <p>
* Note that the {@code LogManager} may only retain weak references to
* registered loggers. In order to prevent {@code Logger} objects from being
* unexpectedly garbage collected it is necessary for <i>applications</i>
* to maintain references to them.
* </p>
*
* @param logger
* the logger to be added.
* @return true if the given logger is added into the namespace
* successfully, false if the given logger exists in the namespace.
*/
public synchronized boolean addLogger(Logger logger) {
String name = logger.getName();
if (loggers.get(name) != null) {
return false;
}
addToFamilyTree(logger, name);
loggers.put(name, logger);
logger.setManager(this);
return true;
}
代码示例来源:origin: FlexoVM/flexovm
/**
* Add a given logger into the hierarchical namespace. The
* {@code Logger.addLogger()} factory methods call this method to add newly
* created Logger. This returns false if a logger with the given name has
* existed in the namespace
* <p>
* Note that the {@code LogManager} may only retain weak references to
* registered loggers. In order to prevent {@code Logger} objects from being
* unexpectedly garbage collected it is necessary for <i>applications</i>
* to maintain references to them.
* </p>
*
* @param logger
* the logger to be added.
* @return true if the given logger is added into the namespace
* successfully, false if the given logger exists in the namespace.
*/
public synchronized boolean addLogger(Logger logger) {
String name = logger.getName();
if (loggers.get(name) != null) {
return false;
}
addToFamilyTree(logger, name);
loggers.put(name, logger);
logger.setManager(this);
return true;
}
内容来源于网络,如有侵权,请联系作者删除!