void reset() { levelObjVal = null; levelIntVal = Level.INFO.intValue(); for (Handler handler : handlers) { try { if (handlers.remove(handler)) { handler.close(); } } catch (Exception ignored) { } } updateDalvikLogHandler(); } }
/** * Sets the flag which indicates whether to use the handlers of this * logger's parent, potentially recursively up the namespace. * * @param notifyParentHandlers * the new flag indicating whether to use the parent's handlers. */ public void setUseParentHandlers(boolean notifyParentHandlers) { // Anonymous loggers can always set the useParentHandlers flag if (this.isNamed) { LogManager.getLogManager().checkAccess(); } this.notifyParentHandlers = notifyParentHandlers; updateDalvikLogHandler(); }
/** * Sets the parent of this logger in the namespace. Callers must first * {@link #checkAccess() check security}. * * @param newParent * the parent logger to set. */ synchronized void setParent(Logger logger, Logger newParent) { logger.parent = newParent; if (logger.levelObjVal == null) { setLevelRecursively(logger, null); } newParent.children.add(logger); logger.updateDalvikLogHandler(); }
/** * Adds a handler to this logger. The {@code name} will be fed with log * records received by this logger. * * @param handler * the handler object to add, cannot be {@code null}. */ public void addHandler(Handler handler) { if (handler == null) { throw new NullPointerException("handler == null"); } // Anonymous loggers can always add handlers if (this.isNamed) { LogManager.getLogManager().checkAccess(); } this.handlers.add(handler); updateDalvikLogHandler(); }
/** * Removes a handler from this logger. If the specified handler does not * exist then this method has no effect. * * @param handler * the handler to be removed. */ public void removeHandler(Handler handler) { // Anonymous loggers can always remove handlers if (this.isNamed) { LogManager.getLogManager().checkAccess(); } if (handler == null) { return; } this.handlers.remove(handler); updateDalvikLogHandler(); }
/** * 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(); }
void reset() { levelObjVal = null; levelIntVal = Level.INFO.intValue(); for (Handler handler : handlers) { try { if (handlers.remove(handler)) { handler.close(); } } catch (Exception ignored) { } } updateDalvikLogHandler(); } }
void reset() { levelObjVal = null; levelIntVal = Level.INFO.intValue(); for (Handler handler : handlers) { try { if (handlers.remove(handler)) { handler.close(); } } catch (Exception ignored) { } } updateDalvikLogHandler(); } }
void reset() { levelObjVal = null; levelIntVal = Level.INFO.intValue(); for (Handler handler : handlers) { try { if (handlers.remove(handler)) { handler.close(); } } catch (Exception ignored) { } } updateDalvikLogHandler(); } }
/** * Sets the parent of this logger in the namespace. Callers must first * {@link #checkAccess() check security}. * * @param newParent * the parent logger to set. */ synchronized void setParent(Logger logger, Logger newParent) { logger.parent = newParent; if (logger.levelObjVal == null) { setLevelRecursively(logger, null); } newParent.children.add(logger); logger.updateDalvikLogHandler(); }
/** * Sets the flag which indicates whether to use the handlers of this * logger's parent, potentially recursively up the namespace. * * @param notifyParentHandlers * the new flag indicating whether to use the parent's handlers. */ public void setUseParentHandlers(boolean notifyParentHandlers) { // Anonymous loggers can always set the useParentHandlers flag if (this.isNamed) { LogManager.getLogManager().checkAccess(); } this.notifyParentHandlers = notifyParentHandlers; updateDalvikLogHandler(); }
/** * Sets the parent of this logger in the namespace. Callers must first * {@link #checkAccess() check security}. * * @param newParent * the parent logger to set. */ synchronized void setParent(Logger logger, Logger newParent) { logger.parent = newParent; if (logger.levelObjVal == null) { setLevelRecursively(logger, null); } newParent.children.add(logger); logger.updateDalvikLogHandler(); }
void reset() { levelObjVal = null; levelIntVal = Level.INFO.intValue(); for (Handler handler : handlers) { try { if (handlers.remove(handler)) { handler.close(); } } catch (Exception ignored) { } } updateDalvikLogHandler(); } }
/** * Sets the flag which indicates whether to use the handlers of this * logger's parent, potentially recursively up the namespace. * * @param notifyParentHandlers * the new flag indicating whether to use the parent's handlers. */ public void setUseParentHandlers(boolean notifyParentHandlers) { // Anonymous loggers can always set the useParentHandlers flag if (this.isNamed) { LogManager.getLogManager().checkAccess(); } this.notifyParentHandlers = notifyParentHandlers; updateDalvikLogHandler(); }
void reset() { levelObjVal = null; levelIntVal = Level.INFO.intValue(); for (Handler handler : handlers) { try { if (handlers.remove(handler)) { handler.close(); } } catch (Exception ignored) { } } updateDalvikLogHandler(); } }
/** * Sets the flag which indicates whether to use the handlers of this * logger's parent, potentially recursively up the namespace. * * @param notifyParentHandlers * the new flag indicating whether to use the parent's handlers. */ public void setUseParentHandlers(boolean notifyParentHandlers) { // Anonymous loggers can always set the useParentHandlers flag if (this.isNamed) { LogManager.getLogManager().checkAccess(); } this.notifyParentHandlers = notifyParentHandlers; updateDalvikLogHandler(); }
/** * Sets the parent of this logger in the namespace. Callers must first * {@link #checkAccess() check security}. * * @param newParent * the parent logger to set. */ synchronized void setParent(Logger logger, Logger newParent) { logger.parent = newParent; if (logger.levelObjVal == null) { setLevelRecursively(logger, null); } newParent.children.add(logger); logger.updateDalvikLogHandler(); }
void reset() { levelObjVal = null; levelIntVal = Level.INFO.intValue(); for (Handler handler : handlers) { try { if (handlers.remove(handler)) { handler.close(); } } catch (Exception ignored) { } } updateDalvikLogHandler(); } }