jdk/src/share/classes/java/util/logging/Level.java
changeset 3853 9d2382b74894
parent 2 90ce3da70b43
child 5506 202f599c92aa
equal deleted inserted replaced
3852:cdde5edc78ff 3853:9d2382b74894
   108      * INFO is a message level for informational messages.
   108      * INFO is a message level for informational messages.
   109      * <p>
   109      * <p>
   110      * Typically INFO messages will be written to the console
   110      * Typically INFO messages will be written to the console
   111      * or its equivalent.  So the INFO level should only be
   111      * or its equivalent.  So the INFO level should only be
   112      * used for reasonably significant messages that will
   112      * used for reasonably significant messages that will
   113      * make sense to end users and system admins.
   113      * make sense to end users and system administrators.
   114      * This level is initialized to <CODE>800</CODE>.
   114      * This level is initialized to <CODE>800</CODE>.
   115      */
   115      */
   116     public static final Level INFO = new Level("INFO", 800, defaultBundle);
   116     public static final Level INFO = new Level("INFO", 800, defaultBundle);
   117 
   117 
   118     /**
   118     /**
   243             return name;
   243             return name;
   244         }
   244         }
   245     }
   245     }
   246 
   246 
   247     /**
   247     /**
       
   248      * Returns a string representation of this Level.
       
   249      *
   248      * @return the non-localized name of the Level, for example "INFO".
   250      * @return the non-localized name of the Level, for example "INFO".
   249      */
   251      */
   250     public final String toString() {
   252     public final String toString() {
   251         return name;
   253         return name;
   252     }
   254     }
   297      * @param  name   string to be parsed
   299      * @param  name   string to be parsed
   298      * @throws NullPointerException if the name is null
   300      * @throws NullPointerException if the name is null
   299      * @throws IllegalArgumentException if the value is not valid.
   301      * @throws IllegalArgumentException if the value is not valid.
   300      * Valid values are integers between <CODE>Integer.MIN_VALUE</CODE>
   302      * Valid values are integers between <CODE>Integer.MIN_VALUE</CODE>
   301      * and <CODE>Integer.MAX_VALUE</CODE>, and all known level names.
   303      * and <CODE>Integer.MAX_VALUE</CODE>, and all known level names.
   302      * Known names are the levels defined by this class (i.e. <CODE>FINE</CODE>,
   304      * Known names are the levels defined by this class (e.g., <CODE>FINE</CODE>,
   303      * <CODE>FINER</CODE>, <CODE>FINEST</CODE>), or created by this class with
   305      * <CODE>FINER</CODE>, <CODE>FINEST</CODE>), or created by this class with
   304      * appropriate package access, or new levels defined or created
   306      * appropriate package access, or new levels defined or created
   305      * by subclasses.
   307      * by subclasses.
   306      *
   308      *
   307      * @return The parsed value. Passing an integer that corresponds to a known name
   309      * @return The parsed value. Passing an integer that corresponds to a known name
   308      * (eg 700) will return the associated name (eg <CODE>CONFIG</CODE>).
   310      * (e.g., 700) will return the associated name (e.g., <CODE>CONFIG</CODE>).
   309      * Passing an integer that does not (eg 1) will return a new level name
   311      * Passing an integer that does not (e.g., 1) will return a new level name
   310      * initialized to that value.
   312      * initialized to that value.
   311      */
   313      */
   312     public static synchronized Level parse(String name) throws IllegalArgumentException {
   314     public static synchronized Level parse(String name) throws IllegalArgumentException {
   313         // Check that name is not null.
   315         // Check that name is not null.
   314         name.length();
   316         name.length();