java.util.logging.Logger.initResourceBundle()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(10.6k)|赞(0)|评价(0)|浏览(109)

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

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();
}

相关文章