本文整理了Java中java.util.logging.Logger.initResourceBundle()
方法的一些代码示例,展示了Logger.initResourceBundle()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Logger.initResourceBundle()
方法的具体详情如下:
包路径:java.util.logging.Logger
类名称:Logger
方法名:initResourceBundle
[英]Initializes this logger's resource bundle.
[中]
代码示例来源:origin: robovm/robovm
/**
* Gets a named logger associated with the supplied resource bundle. The
* resource bundle will be used to localize logging messages.
*
* @param name
* the name of the logger to get, cannot be {@code null}.
* @param resourceBundleName
* the name of the resource bundle, may be {@code null}.
* @throws IllegalArgumentException
* if the logger identified by {@code name} is associated with a
* resource bundle and its name is not equal to
* {@code resourceBundleName}.
* @throws MissingResourceException
* if the name of the resource bundle cannot be found.
* @return a named logger.
*/
public static Logger getLogger(String name, String resourceBundleName) {
Logger result = LogManager.getLogManager()
.getOrCreate(name, resourceBundleName);
result.initResourceBundle(resourceBundleName);
return result;
}
代码示例来源:origin: robovm/robovm
/**
* Constructs a {@code Logger} object with the supplied name and resource
* bundle name; {@code notifiyParentHandlers} is set to {@code true}.
* <p>
* Notice : Loggers use a naming hierarchy. Thus "z.x.y" is a child of "z.x".
*
* @param name
* the name of this logger, may be {@code null} for anonymous
* loggers.
* @param resourceBundleName
* the name of the resource bundle used to localize logging
* messages, may be {@code null}.
* @throws MissingResourceException
* if the specified resource bundle can not be loaded.
*/
protected Logger(String name, String resourceBundleName) {
this.name = name;
initResourceBundle(resourceBundleName);
this.androidTag = DalvikLogging.loggerNameToTag(name);
updateDalvikLogHandler();
}
代码示例来源:origin: com.jtransc/jtransc-rt
public static Logger getLogger(String name, String resourceBundleName) {
Logger result = LogManager.getLogManager().getOrCreate(name, resourceBundleName);
result.initResourceBundle(resourceBundleName);
return result;
}
代码示例来源:origin: com.jtransc/jtransc-rt
protected Logger(String name, String resourceBundleName) {
this.name = name;
initResourceBundle(resourceBundleName);
updateVmLogHandler();
}
代码示例来源:origin: MobiVM/robovm
/**
* Gets a named logger associated with the supplied resource bundle. The
* resource bundle will be used to localize logging messages.
*
* @param name
* the name of the logger to get, cannot be {@code null}.
* @param resourceBundleName
* the name of the resource bundle, may be {@code null}.
* @throws IllegalArgumentException
* if the logger identified by {@code name} is associated with a
* resource bundle and its name is not equal to
* {@code resourceBundleName}.
* @throws MissingResourceException
* if the name of the resource bundle cannot be found.
* @return a named logger.
*/
public static Logger getLogger(String name, String resourceBundleName) {
Logger result = LogManager.getLogManager()
.getOrCreate(name, resourceBundleName);
result.initResourceBundle(resourceBundleName);
return result;
}
代码示例来源:origin: com.mobidevelop.robovm/robovm-rt
/**
* Gets a named logger associated with the supplied resource bundle. The
* resource bundle will be used to localize logging messages.
*
* @param name
* the name of the logger to get, cannot be {@code null}.
* @param resourceBundleName
* the name of the resource bundle, may be {@code null}.
* @throws IllegalArgumentException
* if the logger identified by {@code name} is associated with a
* resource bundle and its name is not equal to
* {@code resourceBundleName}.
* @throws MissingResourceException
* if the name of the resource bundle cannot be found.
* @return a named logger.
*/
public static Logger getLogger(String name, String resourceBundleName) {
Logger result = LogManager.getLogManager()
.getOrCreate(name, resourceBundleName);
result.initResourceBundle(resourceBundleName);
return result;
}
代码示例来源:origin: ibinti/bugvm
/**
* Gets a named logger associated with the supplied resource bundle. The
* resource bundle will be used to localize logging messages.
*
* @param name
* the name of the logger to get, cannot be {@code null}.
* @param resourceBundleName
* the name of the resource bundle, may be {@code null}.
* @throws IllegalArgumentException
* if the logger identified by {@code name} is associated with a
* resource bundle and its name is not equal to
* {@code resourceBundleName}.
* @throws MissingResourceException
* if the name of the resource bundle cannot be found.
* @return a named logger.
*/
public static Logger getLogger(String name, String resourceBundleName) {
Logger result = LogManager.getLogManager()
.getOrCreate(name, resourceBundleName);
result.initResourceBundle(resourceBundleName);
return result;
}
代码示例来源:origin: com.bugvm/bugvm-rt
/**
* Gets a named logger associated with the supplied resource bundle. The
* resource bundle will be used to localize logging messages.
*
* @param name
* the name of the logger to get, cannot be {@code null}.
* @param resourceBundleName
* the name of the resource bundle, may be {@code null}.
* @throws IllegalArgumentException
* if the logger identified by {@code name} is associated with a
* resource bundle and its name is not equal to
* {@code resourceBundleName}.
* @throws MissingResourceException
* if the name of the resource bundle cannot be found.
* @return a named logger.
*/
public static Logger getLogger(String name, String resourceBundleName) {
Logger result = LogManager.getLogManager()
.getOrCreate(name, resourceBundleName);
result.initResourceBundle(resourceBundleName);
return result;
}
代码示例来源:origin: com.gluonhq/robovm-rt
/**
* Gets a named logger associated with the supplied resource bundle. The
* resource bundle will be used to localize logging messages.
*
* @param name
* the name of the logger to get, cannot be {@code null}.
* @param resourceBundleName
* the name of the resource bundle, may be {@code null}.
* @throws IllegalArgumentException
* if the logger identified by {@code name} is associated with a
* resource bundle and its name is not equal to
* {@code resourceBundleName}.
* @throws MissingResourceException
* if the name of the resource bundle cannot be found.
* @return a named logger.
*/
public static Logger getLogger(String name, String resourceBundleName) {
Logger result = LogManager.getLogManager()
.getOrCreate(name, resourceBundleName);
result.initResourceBundle(resourceBundleName);
return result;
}
代码示例来源:origin: FlexoVM/flexovm
/**
* Gets a named logger associated with the supplied resource bundle. The
* resource bundle will be used to localize logging messages.
*
* @param name
* the name of the logger to get, cannot be {@code null}.
* @param resourceBundleName
* the name of the resource bundle, may be {@code null}.
* @throws IllegalArgumentException
* if the logger identified by {@code name} is associated with a
* resource bundle and its name is not equal to
* {@code resourceBundleName}.
* @throws MissingResourceException
* if the name of the resource bundle cannot be found.
* @return a named logger.
*/
public static Logger getLogger(String name, String resourceBundleName) {
Logger result = LogManager.getLogManager()
.getOrCreate(name, resourceBundleName);
result.initResourceBundle(resourceBundleName);
return result;
}
代码示例来源:origin: FlexoVM/flexovm
/**
* Constructs a {@code Logger} object with the supplied name and resource
* bundle name; {@code notifiyParentHandlers} is set to {@code true}.
* <p>
* Notice : Loggers use a naming hierarchy. Thus "z.x.y" is a child of "z.x".
*
* @param name
* the name of this logger, may be {@code null} for anonymous
* loggers.
* @param resourceBundleName
* the name of the resource bundle used to localize logging
* messages, may be {@code null}.
* @throws MissingResourceException
* if the specified resource bundle can not be loaded.
*/
protected Logger(String name, String resourceBundleName) {
this.name = name;
initResourceBundle(resourceBundleName);
this.androidTag = DalvikLogging.loggerNameToTag(name);
updateDalvikLogHandler();
}
代码示例来源:origin: MobiVM/robovm
/**
* Constructs a {@code Logger} object with the supplied name and resource
* bundle name; {@code notifiyParentHandlers} is set to {@code true}.
* <p>
* Notice : Loggers use a naming hierarchy. Thus "z.x.y" is a child of "z.x".
*
* @param name
* the name of this logger, may be {@code null} for anonymous
* loggers.
* @param resourceBundleName
* the name of the resource bundle used to localize logging
* messages, may be {@code null}.
* @throws MissingResourceException
* if the specified resource bundle can not be loaded.
*/
protected Logger(String name, String resourceBundleName) {
this.name = name;
initResourceBundle(resourceBundleName);
this.androidTag = DalvikLogging.loggerNameToTag(name);
updateDalvikLogHandler();
}
代码示例来源:origin: ibinti/bugvm
/**
* Constructs a {@code Logger} object with the supplied name and resource
* bundle name; {@code notifiyParentHandlers} is set to {@code true}.
* <p>
* Notice : Loggers use a naming hierarchy. Thus "z.x.y" is a child of "z.x".
*
* @param name
* the name of this logger, may be {@code null} for anonymous
* loggers.
* @param resourceBundleName
* the name of the resource bundle used to localize logging
* messages, may be {@code null}.
* @throws MissingResourceException
* if the specified resource bundle can not be loaded.
*/
protected Logger(String name, String resourceBundleName) {
this.name = name;
initResourceBundle(resourceBundleName);
this.androidTag = DalvikLogging.loggerNameToTag(name);
updateDalvikLogHandler();
}
代码示例来源:origin: com.mobidevelop.robovm/robovm-rt
/**
* Constructs a {@code Logger} object with the supplied name and resource
* bundle name; {@code notifiyParentHandlers} is set to {@code true}.
* <p>
* Notice : Loggers use a naming hierarchy. Thus "z.x.y" is a child of "z.x".
*
* @param name
* the name of this logger, may be {@code null} for anonymous
* loggers.
* @param resourceBundleName
* the name of the resource bundle used to localize logging
* messages, may be {@code null}.
* @throws MissingResourceException
* if the specified resource bundle can not be loaded.
*/
protected Logger(String name, String resourceBundleName) {
this.name = name;
initResourceBundle(resourceBundleName);
this.androidTag = DalvikLogging.loggerNameToTag(name);
updateDalvikLogHandler();
}
代码示例来源:origin: com.gluonhq/robovm-rt
/**
* Constructs a {@code Logger} object with the supplied name and resource
* bundle name; {@code notifiyParentHandlers} is set to {@code true}.
* <p>
* Notice : Loggers use a naming hierarchy. Thus "z.x.y" is a child of "z.x".
*
* @param name
* the name of this logger, may be {@code null} for anonymous
* loggers.
* @param resourceBundleName
* the name of the resource bundle used to localize logging
* messages, may be {@code null}.
* @throws MissingResourceException
* if the specified resource bundle can not be loaded.
*/
protected Logger(String name, String resourceBundleName) {
this.name = name;
initResourceBundle(resourceBundleName);
this.androidTag = DalvikLogging.loggerNameToTag(name);
updateDalvikLogHandler();
}
代码示例来源:origin: com.bugvm/bugvm-rt
/**
* Constructs a {@code Logger} object with the supplied name and resource
* bundle name; {@code notifiyParentHandlers} is set to {@code true}.
* <p>
* Notice : Loggers use a naming hierarchy. Thus "z.x.y" is a child of "z.x".
*
* @param name
* the name of this logger, may be {@code null} for anonymous
* loggers.
* @param resourceBundleName
* the name of the resource bundle used to localize logging
* messages, may be {@code null}.
* @throws MissingResourceException
* if the specified resource bundle can not be loaded.
*/
protected Logger(String name, String resourceBundleName) {
this.name = name;
initResourceBundle(resourceBundleName);
this.androidTag = DalvikLogging.loggerNameToTag(name);
updateDalvikLogHandler();
}
内容来源于网络,如有侵权,请联系作者删除!