/** * Initializes this logger's resource bundle. * * @throws IllegalArgumentException if this logger's resource bundle already * exists and is different from the resource bundle specified. */ private synchronized void initResourceBundle(String resourceBundleName) { String current = this.resourceBundleName; if (current != null) { if (current.equals(resourceBundleName)) { return; } else { throw new IllegalArgumentException("Resource bundle name '" + resourceBundleName + "' is inconsistent with the existing '" + current + "'"); } } if (resourceBundleName != null) { this.resourceBundle = loadResourceBundle(resourceBundleName); this.resourceBundleName = resourceBundleName; } }
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { in.defaultReadObject(); byte major = in.readByte(); byte minor = in.readByte(); // only check MAJOR version if (major != MAJOR) { throw new IOException("Different version " + Byte.valueOf(major) + "." + Byte.valueOf(minor)); } int length = in.readInt(); if (length >= 0) { parameters = new Object[length]; for (int i = 0; i < parameters.length; i++) { parameters[i] = in.readObject(); } } if (resourceBundleName != null) { try { resourceBundle = Logger.loadResourceBundle(resourceBundleName); } catch (MissingResourceException e) { // Cannot find the specified resource bundle resourceBundle = null; } } } }
if (bundleName != null) { try { record.setResourceBundle(loadResourceBundle(bundleName)); } catch (MissingResourceException e) {
if (bundleName != null) { try { record.setResourceBundle(loadResourceBundle(bundleName)); } catch (MissingResourceException e) {
if (bundleName != null) { try { record.setResourceBundle(loadResourceBundle(bundleName)); } catch (MissingResourceException e) {
if (bundleName != null) { try { record.setResourceBundle(loadResourceBundle(bundleName)); } catch (MissingResourceException e) {
private synchronized void initResourceBundle(String resourceBundleName) { String current = this.resourceBundleName; if (current != null) { if (current.equals(resourceBundleName)) { return; } else { throw new IllegalArgumentException("Resource bundle name '" + resourceBundleName + "' is inconsistent with the existing '" + current + "'"); } } if (resourceBundleName != null) { this.resourceBundle = loadResourceBundle(resourceBundleName); this.resourceBundleName = resourceBundleName; } }
/** * Initializes this logger's resource bundle. * * @throws IllegalArgumentException if this logger's resource bundle already * exists and is different from the resource bundle specified. */ private synchronized void initResourceBundle(String resourceBundleName) { String current = this.resourceBundleName; if (current != null) { if (current.equals(resourceBundleName)) { return; } else { throw new IllegalArgumentException("Resource bundle name '" + resourceBundleName + "' is inconsistent with the existing '" + current + "'"); } } if (resourceBundleName != null) { this.resourceBundle = loadResourceBundle(resourceBundleName); this.resourceBundleName = resourceBundleName; } }
/** * Initializes this logger's resource bundle. * * @throws IllegalArgumentException if this logger's resource bundle already * exists and is different from the resource bundle specified. */ private synchronized void initResourceBundle(String resourceBundleName) { String current = this.resourceBundleName; if (current != null) { if (current.equals(resourceBundleName)) { return; } else { throw new IllegalArgumentException("Resource bundle name '" + resourceBundleName + "' is inconsistent with the existing '" + current + "'"); } } if (resourceBundleName != null) { this.resourceBundle = loadResourceBundle(resourceBundleName); this.resourceBundleName = resourceBundleName; } }
/** * Initializes this logger's resource bundle. * * @throws IllegalArgumentException if this logger's resource bundle already * exists and is different from the resource bundle specified. */ private synchronized void initResourceBundle(String resourceBundleName) { String current = this.resourceBundleName; if (current != null) { if (current.equals(resourceBundleName)) { return; } else { throw new IllegalArgumentException("Resource bundle name '" + resourceBundleName + "' is inconsistent with the existing '" + current + "'"); } } if (resourceBundleName != null) { this.resourceBundle = loadResourceBundle(resourceBundleName); this.resourceBundleName = resourceBundleName; } }
/** * Initializes this logger's resource bundle. * * @throws IllegalArgumentException if this logger's resource bundle already * exists and is different from the resource bundle specified. */ private synchronized void initResourceBundle(String resourceBundleName) { String current = this.resourceBundleName; if (current != null) { if (current.equals(resourceBundleName)) { return; } else { throw new IllegalArgumentException("Resource bundle name '" + resourceBundleName + "' is inconsistent with the existing '" + current + "'"); } } if (resourceBundleName != null) { this.resourceBundle = loadResourceBundle(resourceBundleName); this.resourceBundleName = resourceBundleName; } }
/** * Initializes this logger's resource bundle. * * @throws IllegalArgumentException if this logger's resource bundle already * exists and is different from the resource bundle specified. */ private synchronized void initResourceBundle(String resourceBundleName) { String current = this.resourceBundleName; if (current != null) { if (current.equals(resourceBundleName)) { return; } else { throw new IllegalArgumentException("Resource bundle name '" + resourceBundleName + "' is inconsistent with the existing '" + current + "'"); } } if (resourceBundleName != null) { this.resourceBundle = loadResourceBundle(resourceBundleName); this.resourceBundleName = resourceBundleName; } }
/** * Initializes this logger's resource bundle. * * @throws IllegalArgumentException if this logger's resource bundle already * exists and is different from the resource bundle specified. */ private synchronized void initResourceBundle(String resourceBundleName) { String current = this.resourceBundleName; if (current != null) { if (current.equals(resourceBundleName)) { return; } else { throw new IllegalArgumentException("Resource bundle name '" + resourceBundleName + "' is inconsistent with the existing '" + current + "'"); } } if (resourceBundleName != null) { this.resourceBundle = loadResourceBundle(resourceBundleName); this.resourceBundleName = resourceBundleName; } }
public void logrb(Level logLevel, String sourceClass, String sourceMethod, String bundleName, String msg) { if (!internalIsLoggable(logLevel)) return; LogRecord record = new LogRecord(logLevel, msg); if (bundleName != null) { try { record.setResourceBundle(loadResourceBundle(bundleName)); } catch (MissingResourceException e) { // ignore } record.setResourceBundleName(bundleName); } record.setLoggerName(this.name); record.setSourceClassName(sourceClass); record.setSourceMethodName(sourceMethod); log(record); }
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { in.defaultReadObject(); byte major = in.readByte(); byte minor = in.readByte(); // only check MAJOR version if (major != MAJOR) { throw new IOException("Different version " + Byte.valueOf(major) + "." + Byte.valueOf(minor)); } int length = in.readInt(); if (length >= 0) { parameters = new Object[length]; for (int i = 0; i < parameters.length; i++) { parameters[i] = in.readObject(); } } if (resourceBundleName != null) { try { resourceBundle = Logger.loadResourceBundle(resourceBundleName); } catch (MissingResourceException e) { // Cannot find the specified resource bundle resourceBundle = null; } } } }
public void logrb(Level logLevel, String sourceClass, String sourceMethod, String bundleName, String msg, Throwable thrown) { if (!internalIsLoggable(logLevel)) return; LogRecord record = new LogRecord(logLevel, msg); if (bundleName != null) { try { record.setResourceBundle(loadResourceBundle(bundleName)); } catch (MissingResourceException e) { // ignore } record.setResourceBundleName(bundleName); } record.setLoggerName(this.name); record.setSourceClassName(sourceClass); record.setSourceMethodName(sourceMethod); record.setThrown(thrown); log(record); }
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { in.defaultReadObject(); byte major = in.readByte(); byte minor = in.readByte(); // only check MAJOR version if (major != MAJOR) { throw new IOException("Different version " + Byte.valueOf(major) + "." + Byte.valueOf(minor)); } int length = in.readInt(); if (length >= 0) { parameters = new Object[length]; for (int i = 0; i < parameters.length; i++) { parameters[i] = in.readObject(); } } if (resourceBundleName != null) { try { resourceBundle = Logger.loadResourceBundle(resourceBundleName); } catch (MissingResourceException e) { // Cannot find the specified resource bundle resourceBundle = null; } } } }
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { in.defaultReadObject(); byte major = in.readByte(); byte minor = in.readByte(); // only check MAJOR version if (major != MAJOR) { throw new IOException("Different version " + Byte.valueOf(major) + "." + Byte.valueOf(minor)); } int length = in.readInt(); if (length >= 0) { parameters = new Object[length]; for (int i = 0; i < parameters.length; i++) { parameters[i] = in.readObject(); } } if (resourceBundleName != null) { try { resourceBundle = Logger.loadResourceBundle(resourceBundleName); } catch (MissingResourceException e) { // Cannot find the specified resource bundle resourceBundle = null; } } } }
public void logrb(Level logLevel, String sourceClass, String sourceMethod, String bundleName, String msg, Object[] params) { if (!internalIsLoggable(logLevel)) return; LogRecord record = new LogRecord(logLevel, msg); if (bundleName != null) { try { record.setResourceBundle(loadResourceBundle(bundleName)); } catch (MissingResourceException e) { // ignore } record.setResourceBundleName(bundleName); } record.setLoggerName(this.name); record.setSourceClassName(sourceClass); record.setSourceMethodName(sourceMethod); record.setParameters(params); log(record); }
public void logrb(Level logLevel, String sourceClass, String sourceMethod, String bundleName, String msg, Object param) { if (!internalIsLoggable(logLevel)) return; LogRecord record = new LogRecord(logLevel, msg); if (bundleName != null) { try { record.setResourceBundle(loadResourceBundle(bundleName)); } catch (MissingResourceException e) { // ignore } record.setResourceBundleName(bundleName); } record.setLoggerName(this.name); record.setSourceClassName(sourceClass); record.setSourceMethodName(sourceMethod); record.setParameters(new Object[] { param }); log(record); }