/** * Get level with specified symbolic name. * @param s symbolic name. * @return matching level or Level.DEBUG if no match. */ public static Level toLevel(final String s) { return toLevel(s, Level.DEBUG); }
/** * Populate list of levels. */ private static void populateLevels() { levelList = new LinkedList(); levelList.add(Level.FATAL.toString()); levelList.add(Level.ERROR.toString()); levelList.add(Level.WARN.toString()); levelList.add(Level.INFO.toString()); levelList.add(Level.DEBUG.toString()); Level trace = Level.toLevel(5000, null); if (trace != null) { levelList.add(trace.toString()); } utilLoggingLevelList = new LinkedList(); utilLoggingLevelList.add(UtilLoggingLevel.SEVERE.toString()); utilLoggingLevelList.add(UtilLoggingLevel.WARNING.toString()); utilLoggingLevelList.add(UtilLoggingLevel.INFO.toString()); utilLoggingLevelList.add(UtilLoggingLevel.CONFIG.toString()); utilLoggingLevelList.add(UtilLoggingLevel.FINE.toString()); utilLoggingLevelList.add(UtilLoggingLevel.FINER.toString()); utilLoggingLevelList.add(UtilLoggingLevel.FINEST.toString()); }
/** * Populate list of levels. */ private static void populateLevels() { levelList = new LinkedList(); levelList.add(Level.FATAL.toString()); levelList.add(Level.ERROR.toString()); levelList.add(Level.WARN.toString()); levelList.add(Level.INFO.toString()); levelList.add(Level.DEBUG.toString()); Level trace = Level.toLevel(5000, null); if (trace != null) { levelList.add(trace.toString()); } utilLoggingLevelList = new LinkedList(); utilLoggingLevelList.add(UtilLoggingLevel.SEVERE.toString()); utilLoggingLevelList.add(UtilLoggingLevel.WARNING.toString()); utilLoggingLevelList.add(UtilLoggingLevel.INFO.toString()); utilLoggingLevelList.add(UtilLoggingLevel.CONFIG.toString()); utilLoggingLevelList.add(UtilLoggingLevel.FINE.toString()); utilLoggingLevelList.add(UtilLoggingLevel.FINER.toString()); utilLoggingLevelList.add(UtilLoggingLevel.FINEST.toString()); }
/** * Gets level matching numeric value. * @param val numeric value. * @return matching level or UtilLoggerLevel.FINEST if no match. */ public static Level toLevel(final int val) { return toLevel(val, FINEST); }
/** * Get level with specified symbolic name. * @param s symbolic name. * @return matching level or Level.DEBUG if no match. */ public static Level toLevel(final String s) { return toLevel(s, Level.DEBUG); }
/** * Gets level matching numeric value. * @param val numeric value. * @return matching level or UtilLoggerLevel.FINEST if no match. */ public static Level toLevel(final int val) { return toLevel(val, FINEST); }
/** * Get level with specified symbolic name. * @param s symbolic name. * @return matching level or Level.DEBUG if no match. */ public static Level toLevel(final String s) { return toLevel(s, Level.DEBUG); }
/** * Get level with specified symbolic name. * @param s symbolic name. * @return matching level or Level.DEBUG if no match. */ public static Level toLevel(final String s) { return toLevel(s, Level.DEBUG); }
/** * Gets level matching numeric value. * @param val numeric value. * @return matching level or UtilLoggerLevel.FINEST if no match. */ public static Level toLevel(final int val) { return toLevel(val, FINEST); }
/** * Get level with specified symbolic name. * @param s symbolic name. * @return matching level or Level.DEBUG if no match. */ public static Level toLevel(final String s) { return toLevel(s, Level.DEBUG); }
/** * Gets level matching numeric value. * @param val numeric value. * @return matching level or UtilLoggerLevel.FINEST if no match. */ public static Level toLevel(final int val) { return toLevel(val, FINEST); }
/** * Gets level matching numeric value. * @param val numeric value. * @return matching level or UtilLoggerLevel.FINEST if no match. */ public static Level toLevel(final int val) { return toLevel(val, FINEST); }
/** * Gets level matching numeric value. * @param val numeric value. * @return matching level or UtilLoggerLevel.FINEST if no match. */ public static Level toLevel(final int val) { return toLevel(val, FINEST); }
/** * Get level with specified symbolic name. * @param s symbolic name. * @return matching level or Level.DEBUG if no match. */ public static Level toLevel(final String s) { return toLevel(s, Level.DEBUG); }
/** * Create new rule. * @param value name of level. * @return instance of NotLevelEqualsRule. */ public static Rule getRule(final String value) { Level thisLevel; if (levelList.contains(value.toUpperCase())) { thisLevel = Level.toLevel(value.toUpperCase()); } else { thisLevel = UtilLoggingLevel.toLevel(value.toUpperCase()); } return new NotLevelEqualsRule(thisLevel); }
/** * Create new rule. * @param value name of level. * @return instance of LevelEqualsRule. */ public static Rule getRule(final String value) { Level thisLevel; if (levelList.contains(value.toUpperCase())) { thisLevel = Level.toLevel(value.toUpperCase()); } else { thisLevel = UtilLoggingLevel.toLevel(value.toUpperCase()); } return new LevelEqualsRule(thisLevel); }
/** * Create new rule. * @param value name of level. * @return instance of NotLevelEqualsRule. */ public static Rule getRule(final String value) { Level thisLevel; if (levelList.contains(value.toUpperCase())) { thisLevel = Level.toLevel(value.toUpperCase()); } else { thisLevel = UtilLoggingLevel.toLevel(value.toUpperCase()); } return new NotLevelEqualsRule(thisLevel); }
/** * Create new rule. * @param value name of level. * @return instance of LevelEqualsRule. */ public static Rule getRule(final String value) { Level thisLevel; if (levelList.contains(value.toUpperCase())) { thisLevel = Level.toLevel(value.toUpperCase()); } else { thisLevel = UtilLoggingLevel.toLevel(value.toUpperCase()); } return new LevelEqualsRule(thisLevel); }
/** * Deserialize the state of the object. * * @param in object input stream. * * @throws IOException if error in reading stream for deserialization. */ private void readObject(final java.io.ObjectInputStream in) throws IOException { populateLevels(); boolean isUtilLogging = in.readBoolean(); int levelInt = in.readInt(); if (isUtilLogging) { level = UtilLoggingLevel.toLevel(levelInt); } else { level = Level.toLevel(levelInt); } }
/** * Deserialize the state of the object. * * @param in object input stream. * * @throws IOException if error in reading stream for deserialization. */ private void readObject(final java.io.ObjectInputStream in) throws IOException { populateLevels(); boolean isUtilLogging = in.readBoolean(); int levelInt = in.readInt(); if (isUtilLogging) { level = UtilLoggingLevel.toLevel(levelInt); } else { level = Level.toLevel(levelInt); } }