Skip to content

Commit

Permalink
Remove ResourceBundle from logging api introduced in previous changeset
Browse files Browse the repository at this point in the history
Change-Id: I9755095a2c45fa02df8b8d0f6f2619424b8ddafc
  • Loading branch information
korzha authored and Gerrit Code Review committed Aug 26, 2015
1 parent 5e5d263 commit cf4c60e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 13 deletions.
Expand Up @@ -70,7 +70,7 @@ public Enumeration<String> getLoggerNames() {
private void addLoggerAndEnsureParents(Logger logger) {
String name = logger.getName();
String parentName = name.substring(0, Math.max(0, name.lastIndexOf('.')));
logger.setParent(ensureLogger(parentName, logger.getResourceBundleName()));
logger.setParent(ensureLogger(parentName));
addLoggerImpl(logger);
}

Expand All @@ -88,10 +88,10 @@ private void addLoggerImpl(Logger logger) {
* APIs for getLogger and addLogger make it difficult to use those functions
* for this.
*/
Logger ensureLogger(String name, String resourceName) {
Logger ensureLogger(String name) {
Logger logger = getLogger(name);
if (logger == null) {
Logger newLogger = new Logger(name, resourceName);
Logger newLogger = new Logger(name, null);
addLoggerAndEnsureParents(newLogger);
return newLogger;
}
Expand Down
14 changes: 4 additions & 10 deletions user/super/com/google/gwt/emul/java/util/logging/Logger.java
Expand Up @@ -46,15 +46,11 @@ public static Logger getGlobal() {
}

public static Logger getLogger(String name) {
return getLogger(name, null);
}

public static Logger getLogger(String name, String resourceName) {
// Use shortcut if logging is disabled to avoid parent logger creations in LogManager
if (LOGGING_FALSE) {
return new Logger(name, resourceName);
return new Logger(name, null);
}
return LogManager.getLogManager().ensureLogger(name, resourceName);
return LogManager.getLogManager().ensureLogger(name);
}

static void assertLoggingValues() {
Expand Down Expand Up @@ -159,10 +155,6 @@ public Logger getParent() {
return LOGGING_FALSE ? null : parent;
}

public String getResourceBundleName() {
return null;
}

public boolean getUseParentHandlers() {
return LOGGING_FALSE ? false : useParentHandlers;
}
Expand Down Expand Up @@ -284,7 +276,9 @@ private void actuallyLog(LogRecord record) {
// public static Logger getAnonymousLogger() {
// public static Logger getAnonymousLogger(String resourceBundleName) {}
// public Filter getFilter() {}
// public static Logger getLogger(String name, String resourceBundleName) {}
// public ResourceBundle getResourceBundle() {}
// public String getResourceBundleName() {}
// public void setFilter(Filter newFilter) {}
// public void entering(String sourceClass, String sourceMethod) {}
// public void entering(String sourceClass, String sourceMethod, Object param1) {}
Expand Down

0 comments on commit cf4c60e

Please sign in to comment.