6882363: 4/4 typos in java.util.logging javadocs
Fix typos, some grammar and some inconsistencies in phrasing. Reviewed-by: tbell
This commit is contained in:
parent
06f38fc45f
commit
f97dbeeb5c
@ -28,7 +28,7 @@ package java.util.logging;
|
||||
|
||||
/**
|
||||
* ErrorManager objects can be attached to Handlers to process
|
||||
* any error that occur on a Handler during Logging.
|
||||
* any error that occurs on a Handler during Logging.
|
||||
* <p>
|
||||
* When processing logging output, if a Handler encounters problems
|
||||
* then rather than throwing an Exception back to the issuer of
|
||||
@ -72,7 +72,7 @@ public class ErrorManager {
|
||||
/**
|
||||
* The error method is called when a Handler failure occurs.
|
||||
* <p>
|
||||
* This method may be overriden in subclasses. The default
|
||||
* This method may be overridden in subclasses. The default
|
||||
* behavior in this base class is that the first call is
|
||||
* reported to System.err, and subsequent calls are ignored.
|
||||
*
|
||||
|
@ -39,7 +39,7 @@ import java.security.*;
|
||||
* For a rotating set of files, as each file reaches a given size
|
||||
* limit, it is closed, rotated out, and a new file opened.
|
||||
* Successively older files are named by adding "0", "1", "2",
|
||||
* etc into the base filename.
|
||||
* etc. into the base filename.
|
||||
* <p>
|
||||
* By default buffering is enabled in the IO libraries but each log
|
||||
* record is flushed out when it is complete.
|
||||
@ -391,7 +391,7 @@ public class FileHandler extends StreamHandler {
|
||||
// Generate a lock file name from the "unique" int.
|
||||
lockFileName = generate(pattern, 0, unique).toString() + ".lck";
|
||||
// Now try to lock that filename.
|
||||
// Because some systems (e.g. Solaris) can only do file locks
|
||||
// Because some systems (e.g., Solaris) can only do file locks
|
||||
// between processes (and not within a process), we first check
|
||||
// if we ourself already have the file locked.
|
||||
synchronized(locks) {
|
||||
|
@ -52,7 +52,7 @@ public abstract class Formatter {
|
||||
* Format the given log record and return the formatted string.
|
||||
* <p>
|
||||
* The resulting formatted String will normally include a
|
||||
* localized and formated version of the LogRecord's message field.
|
||||
* localized and formatted version of the LogRecord's message field.
|
||||
* It is recommended to use the {@link Formatter#formatMessage}
|
||||
* convenience method to localize and format the message field.
|
||||
*
|
||||
@ -66,7 +66,7 @@ public abstract class Formatter {
|
||||
* Return the header string for a set of formatted records.
|
||||
* <p>
|
||||
* This base class returns an empty string, but this may be
|
||||
* overriden by subclasses.
|
||||
* overridden by subclasses.
|
||||
*
|
||||
* @param h The target handler (can be null)
|
||||
* @return header string
|
||||
@ -79,7 +79,7 @@ public abstract class Formatter {
|
||||
* Return the tail string for a set of formatted records.
|
||||
* <p>
|
||||
* This base class returns an empty string, but this may be
|
||||
* overriden by subclasses.
|
||||
* overridden by subclasses.
|
||||
*
|
||||
* @param h The target handler (can be null)
|
||||
* @return tail string
|
||||
|
@ -274,7 +274,7 @@ public abstract class Handler {
|
||||
* <tt>Level</tt> and whether it satisfies any <tt>Filter</tt>. It also
|
||||
* may make other <tt>Handler</tt> specific checks that might prevent a
|
||||
* handler from logging the <tt>LogRecord</tt>. It will return false if
|
||||
* the <tt>LogRecord</tt> is Null.
|
||||
* the <tt>LogRecord</tt> is null.
|
||||
* <p>
|
||||
* @param record a <tt>LogRecord</tt>
|
||||
* @return true if the <tt>LogRecord</tt> would be logged.
|
||||
|
@ -110,7 +110,7 @@ public class Level implements java.io.Serializable {
|
||||
* Typically INFO messages will be written to the console
|
||||
* or its equivalent. So the INFO level should only be
|
||||
* used for reasonably significant messages that will
|
||||
* make sense to end users and system admins.
|
||||
* make sense to end users and system administrators.
|
||||
* This level is initialized to <CODE>800</CODE>.
|
||||
*/
|
||||
public static final Level INFO = new Level("INFO", 800, defaultBundle);
|
||||
@ -245,6 +245,8 @@ public class Level implements java.io.Serializable {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a string representation of this Level.
|
||||
*
|
||||
* @return the non-localized name of the Level, for example "INFO".
|
||||
*/
|
||||
public final String toString() {
|
||||
@ -299,14 +301,14 @@ public class Level implements java.io.Serializable {
|
||||
* @throws IllegalArgumentException if the value is not valid.
|
||||
* Valid values are integers between <CODE>Integer.MIN_VALUE</CODE>
|
||||
* and <CODE>Integer.MAX_VALUE</CODE>, and all known level names.
|
||||
* Known names are the levels defined by this class (i.e. <CODE>FINE</CODE>,
|
||||
* Known names are the levels defined by this class (e.g., <CODE>FINE</CODE>,
|
||||
* <CODE>FINER</CODE>, <CODE>FINEST</CODE>), or created by this class with
|
||||
* appropriate package access, or new levels defined or created
|
||||
* by subclasses.
|
||||
*
|
||||
* @return The parsed value. Passing an integer that corresponds to a known name
|
||||
* (eg 700) will return the associated name (eg <CODE>CONFIG</CODE>).
|
||||
* Passing an integer that does not (eg 1) will return a new level name
|
||||
* (e.g., 700) will return the associated name (e.g., <CODE>CONFIG</CODE>).
|
||||
* Passing an integer that does not (e.g., 1) will return a new level name
|
||||
* initialized to that value.
|
||||
*/
|
||||
public static synchronized Level parse(String name) throws IllegalArgumentException {
|
||||
|
@ -188,7 +188,7 @@ public class LogRecord implements java.io.Serializable {
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the source Logger name's
|
||||
* Get the source Logger's name.
|
||||
*
|
||||
* @return source logger name (may be null)
|
||||
*/
|
||||
@ -197,7 +197,7 @@ public class LogRecord implements java.io.Serializable {
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the source Logger name.
|
||||
* Set the source Logger's name.
|
||||
*
|
||||
* @param name the source logger name (may be null)
|
||||
*/
|
||||
|
@ -66,7 +66,7 @@ import java.lang.ref.WeakReference;
|
||||
* effective level from its parent.
|
||||
* <p>
|
||||
* On each logging call the Logger initially performs a cheap
|
||||
* check of the request level (e.g. SEVERE or FINE) against the
|
||||
* check of the request level (e.g., SEVERE or FINE) against the
|
||||
* effective log level of the logger. If the request level is
|
||||
* lower than the log level, the logging call returns immediately.
|
||||
* <p>
|
||||
@ -230,7 +230,7 @@ public class Logger {
|
||||
* Protected method to construct a logger for a named subsystem.
|
||||
* <p>
|
||||
* The logger will be initially configured with a null Level
|
||||
* and with useParentHandlers true.
|
||||
* and with useParentHandlers set to true.
|
||||
*
|
||||
* @param name A name for the logger. This should
|
||||
* be a dot-separated name and should normally
|
||||
@ -240,7 +240,7 @@ public class Logger {
|
||||
* @param resourceBundleName name of ResourceBundle to be used for localizing
|
||||
* messages for this logger. May be null if none
|
||||
* of the messages require localization.
|
||||
* @throws MissingResourceException if the ResourceBundleName is non-null and
|
||||
* @throws MissingResourceException if the resourceBundleName is non-null and
|
||||
* no corresponding resource can be found.
|
||||
*/
|
||||
protected Logger(String name, String resourceBundleName) {
|
||||
@ -285,7 +285,7 @@ public class Logger {
|
||||
* <p>
|
||||
* If a new logger is created its log level will be configured
|
||||
* based on the LogManager configuration and it will configured
|
||||
* to also send logging output to its parent's handlers. It will
|
||||
* to also send logging output to its parent's Handlers. It will
|
||||
* be registered in the LogManager global namespace.
|
||||
*
|
||||
* @param name A name for the logger. This should
|
||||
@ -308,7 +308,7 @@ public class Logger {
|
||||
* <p>
|
||||
* If a new logger is created its log level will be configured
|
||||
* based on the LogManager and it will configured to also send logging
|
||||
* output to its parent loggers Handlers. It will be registered in
|
||||
* output to its parent's Handlers. It will be registered in
|
||||
* the LogManager global namespace.
|
||||
* <p>
|
||||
* If the named Logger already exists and does not yet have a
|
||||
@ -326,7 +326,8 @@ public class Logger {
|
||||
* messages for this logger. May be <CODE>null</CODE> if none of
|
||||
* the messages require localization.
|
||||
* @return a suitable Logger
|
||||
* @throws MissingResourceException if the named ResourceBundle cannot be found.
|
||||
* @throws MissingResourceException if the resourceBundleName is non-null and
|
||||
* no corresponding resource can be found.
|
||||
* @throws IllegalArgumentException if the Logger already exists and uses
|
||||
* a different resource bundle name.
|
||||
* @throws NullPointerException if the name is null.
|
||||
@ -395,7 +396,8 @@ public class Logger {
|
||||
* messages for this logger.
|
||||
* May be null if none of the messages require localization.
|
||||
* @return a newly created private Logger
|
||||
* @throws MissingResourceException if the named ResourceBundle cannot be found.
|
||||
* @throws MissingResourceException if the resourceBundleName is non-null and
|
||||
* no corresponding resource can be found.
|
||||
*/
|
||||
public static synchronized Logger getAnonymousLogger(String resourceBundleName) {
|
||||
LogManager manager = LogManager.getLogManager();
|
||||
@ -514,7 +516,7 @@ public class Logger {
|
||||
* level then the given message is forwarded to all the
|
||||
* registered output Handler objects.
|
||||
* <p>
|
||||
* @param level One of the message level identifiers, e.g. SEVERE
|
||||
* @param level One of the message level identifiers, e.g., SEVERE
|
||||
* @param msg The string message (or a key in the message catalog)
|
||||
*/
|
||||
public void log(Level level, String msg) {
|
||||
@ -532,7 +534,7 @@ public class Logger {
|
||||
* level then a corresponding LogRecord is created and forwarded
|
||||
* to all the registered output Handler objects.
|
||||
* <p>
|
||||
* @param level One of the message level identifiers, e.g. SEVERE
|
||||
* @param level One of the message level identifiers, e.g., SEVERE
|
||||
* @param msg The string message (or a key in the message catalog)
|
||||
* @param param1 parameter to the message
|
||||
*/
|
||||
@ -553,7 +555,7 @@ public class Logger {
|
||||
* level then a corresponding LogRecord is created and forwarded
|
||||
* to all the registered output Handler objects.
|
||||
* <p>
|
||||
* @param level One of the message level identifiers, e.g. SEVERE
|
||||
* @param level One of the message level identifiers, e.g., SEVERE
|
||||
* @param msg The string message (or a key in the message catalog)
|
||||
* @param params array of parameters to the message
|
||||
*/
|
||||
@ -578,7 +580,7 @@ public class Logger {
|
||||
* processed specially by output Formatters and is not treated
|
||||
* as a formatting parameter to the LogRecord message property.
|
||||
* <p>
|
||||
* @param level One of the message level identifiers, e.g. SEVERE
|
||||
* @param level One of the message level identifiers, e.g., SEVERE
|
||||
* @param msg The string message (or a key in the message catalog)
|
||||
* @param thrown Throwable associated with log message.
|
||||
*/
|
||||
@ -603,7 +605,7 @@ public class Logger {
|
||||
* level then the given message is forwarded to all the
|
||||
* registered output Handler objects.
|
||||
* <p>
|
||||
* @param level One of the message level identifiers, e.g. SEVERE
|
||||
* @param level One of the message level identifiers, e.g., SEVERE
|
||||
* @param sourceClass name of class that issued the logging request
|
||||
* @param sourceMethod name of method that issued the logging request
|
||||
* @param msg The string message (or a key in the message catalog)
|
||||
@ -626,7 +628,7 @@ public class Logger {
|
||||
* level then a corresponding LogRecord is created and forwarded
|
||||
* to all the registered output Handler objects.
|
||||
* <p>
|
||||
* @param level One of the message level identifiers, e.g. SEVERE
|
||||
* @param level One of the message level identifiers, e.g., SEVERE
|
||||
* @param sourceClass name of class that issued the logging request
|
||||
* @param sourceMethod name of method that issued the logging request
|
||||
* @param msg The string message (or a key in the message catalog)
|
||||
@ -653,7 +655,7 @@ public class Logger {
|
||||
* level then a corresponding LogRecord is created and forwarded
|
||||
* to all the registered output Handler objects.
|
||||
* <p>
|
||||
* @param level One of the message level identifiers, e.g. SEVERE
|
||||
* @param level One of the message level identifiers, e.g., SEVERE
|
||||
* @param sourceClass name of class that issued the logging request
|
||||
* @param sourceMethod name of method that issued the logging request
|
||||
* @param msg The string message (or a key in the message catalog)
|
||||
@ -684,7 +686,7 @@ public class Logger {
|
||||
* processed specially by output Formatters and is not treated
|
||||
* as a formatting parameter to the LogRecord message property.
|
||||
* <p>
|
||||
* @param level One of the message level identifiers, e.g. SEVERE
|
||||
* @param level One of the message level identifiers, e.g., SEVERE
|
||||
* @param sourceClass name of class that issued the logging request
|
||||
* @param sourceMethod name of method that issued the logging request
|
||||
* @param msg The string message (or a key in the message catalog)
|
||||
@ -731,7 +733,7 @@ public class Logger {
|
||||
* resource bundle name is null, or an empty String or invalid
|
||||
* then the msg string is not localized.
|
||||
* <p>
|
||||
* @param level One of the message level identifiers, e.g. SEVERE
|
||||
* @param level One of the message level identifiers, e.g., SEVERE
|
||||
* @param sourceClass name of class that issued the logging request
|
||||
* @param sourceMethod name of method that issued the logging request
|
||||
* @param bundleName name of resource bundle to localize msg,
|
||||
@ -762,7 +764,7 @@ public class Logger {
|
||||
* resource bundle name is null, or an empty String or invalid
|
||||
* then the msg string is not localized.
|
||||
* <p>
|
||||
* @param level One of the message level identifiers, e.g. SEVERE
|
||||
* @param level One of the message level identifiers, e.g., SEVERE
|
||||
* @param sourceClass name of class that issued the logging request
|
||||
* @param sourceMethod name of method that issued the logging request
|
||||
* @param bundleName name of resource bundle to localize msg,
|
||||
@ -795,7 +797,7 @@ public class Logger {
|
||||
* resource bundle name is null, or an empty String or invalid
|
||||
* then the msg string is not localized.
|
||||
* <p>
|
||||
* @param level One of the message level identifiers, e.g. SEVERE
|
||||
* @param level One of the message level identifiers, e.g., SEVERE
|
||||
* @param sourceClass name of class that issued the logging request
|
||||
* @param sourceMethod name of method that issued the logging request
|
||||
* @param bundleName name of resource bundle to localize msg,
|
||||
@ -832,7 +834,7 @@ public class Logger {
|
||||
* processed specially by output Formatters and is not treated
|
||||
* as a formatting parameter to the LogRecord message property.
|
||||
* <p>
|
||||
* @param level One of the message level identifiers, e.g. SEVERE
|
||||
* @param level One of the message level identifiers, e.g., SEVERE
|
||||
* @param sourceClass name of class that issued the logging request
|
||||
* @param sourceMethod name of method that issued the logging request
|
||||
* @param bundleName name of resource bundle to localize msg,
|
||||
@ -1214,7 +1216,7 @@ public class Logger {
|
||||
|
||||
/**
|
||||
* Specify whether or not this logger should send its output
|
||||
* to it's parent Logger. This means that any LogRecords will
|
||||
* to its parent Logger. This means that any LogRecords will
|
||||
* also be written to the parent's Handlers, and potentially
|
||||
* to its parent, recursively up the namespace.
|
||||
*
|
||||
|
@ -105,8 +105,8 @@ public interface LoggingMXBean extends PlatformManagedObject {
|
||||
*
|
||||
* @param loggerName The name of the <tt>Logger</tt> to be set.
|
||||
* Must be non-null.
|
||||
* @param levelName The name of the level to set the specified logger to,
|
||||
* or <tt>null</tt> if to set the level to inherit
|
||||
* @param levelName The name of the level to set on the specified logger,
|
||||
* or <tt>null</tt> if setting the level to inherit
|
||||
* from its nearest ancestor.
|
||||
*
|
||||
* @throws IllegalArgumentException if the specified logger
|
||||
|
@ -136,7 +136,7 @@ public class MemoryHandler extends Handler {
|
||||
* @param size the number of log records to buffer (must be greater than zero)
|
||||
* @param pushLevel message level to push on
|
||||
*
|
||||
* @throws IllegalArgumentException is size is <= 0
|
||||
* @throws IllegalArgumentException if size is <= 0
|
||||
*/
|
||||
public MemoryHandler(Handler target, int size, Level pushLevel) {
|
||||
if (target == null || pushLevel == null) {
|
||||
@ -258,7 +258,7 @@ public class MemoryHandler extends Handler {
|
||||
* This method checks if the <tt>LogRecord</tt> has an appropriate level and
|
||||
* whether it satisfies any <tt>Filter</tt>. However it does <b>not</b>
|
||||
* check whether the <tt>LogRecord</tt> would result in a "push" of the
|
||||
* buffer contents. It will return false if the <tt>LogRecord</tt> is Null.
|
||||
* buffer contents. It will return false if the <tt>LogRecord</tt> is null.
|
||||
* <p>
|
||||
* @param record a <tt>LogRecord</tt>
|
||||
* @return true if the <tt>LogRecord</tt> would be logged.
|
||||
|
@ -220,7 +220,7 @@ public class StreamHandler extends Handler {
|
||||
* <p>
|
||||
* This method checks if the <tt>LogRecord</tt> has an appropriate level and
|
||||
* whether it satisfies any <tt>Filter</tt>. It will also return false if
|
||||
* no output stream has been assigned yet or the LogRecord is Null.
|
||||
* no output stream has been assigned yet or the LogRecord is null.
|
||||
* <p>
|
||||
* @param record a <tt>LogRecord</tt>
|
||||
* @return true if the <tt>LogRecord</tt> would be logged.
|
||||
|
Loading…
x
Reference in New Issue
Block a user