Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.eclipse.jetty.util.log
Class Log

    java.lang.Object
      org.eclipse.jetty.util.log.Log

    public class Log

extends java.lang.Object

Logging. This class provides a static logging interface. If an instance of the org.slf4j.Logger class is found on the classpath, the static log methods are directed to a slf4j logger for "org.eclipse.log". Otherwise the logs are directed to stderr.

The "org.eclipse.jetty.util.log.class" system property can be used to select a specific logging implementation.

If the system property org.eclipse.jetty.util.log.IGNORED is set, then ignored exceptions are logged in detail.

See Also:
  `StdErrLog`, `Slf4jLog`

Field Summary
`static boolean` | `__ignored`
`static java.lang.String` | `__logClass`
`static java.lang.String` | `EXCEPTION`
`static java.lang.String` | `IGNORED`

Constructor Summary
`Log()`

Method Summary
`static void` | `debug(java.lang.String msg)`
`static void` | `debug(java.lang.String msg, java.lang.Object arg)`
`static void` | `debug(java.lang.String msg, java.lang.Object arg0, java.lang.Object arg1)`
`static void` | `debug(java.lang.Throwable th)`
`static Logger` | `getLog()`
`static Logger` | `getLogger(java.lang.String name)` Obtain a named Logger or the default Logger if null is passed.
`static void` | `ignore(java.lang.Throwable thrown)` Ignore an exception unless trace is enabled.
`static void` | `info(java.lang.String msg)`
`static void` | `info(java.lang.String msg, java.lang.Object arg)`
`static void` | `info(java.lang.String msg, java.lang.Object arg0, java.lang.Object arg1)`
`static boolean` | `initialized()`
`static boolean` | `isDebugEnabled()`
`static void` | `setLog(Logger log)`
`static void` | `setLogToParent(java.lang.String name)` Set Log to parent Logger.
`static void` | `warn(java.lang.String msg)`
`static void` | `warn(java.lang.String msg, java.lang.Object arg)`
`static void` | `warn(java.lang.String msg, java.lang.Object arg0, java.lang.Object arg1)`
`static void` | `warn(java.lang.String msg, java.lang.Throwable th)`
`static void` | `warn(java.lang.Throwable th)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### EXCEPTION

    public static final java.lang.String EXCEPTION

See Also:
  Constant Field Values

### IGNORED

    public static final java.lang.String IGNORED

See Also:
  Constant Field Values

### __logClass

    public static java.lang.String __logClass

### __ignored

    public static boolean __ignored

Constructor Detail

### Log

    public Log()

Method Detail

### initialized

    public static boolean initialized()

### setLog

    public static void setLog(Logger log)

### getLog

    public static Logger getLog()

### setLogToParent

    public static void setLogToParent(java.lang.String name)

  Set Log to parent Logger.

  If there is a different Log class available from a parent classloader, call `getLogger(String)` on it and construct a `LoggerLog` instance as this Log's Logger, so that logging is delegated to the parent Log.

  This should be used if a webapp is using Log, but wishes the logging to be directed to the containers log.

  If there is not parent Log, then this call is equivalent to

         Log.setLog(Log.getLogger(name));

  Parameters:
    `name` - Logger name

### debug

    public static void debug(java.lang.Throwable th)

### debug

    public static void debug(java.lang.String msg)

### debug

    public static void debug(java.lang.String msg,
                             java.lang.Object arg)

### debug

    public static void debug(java.lang.String msg,
                             java.lang.Object arg0,
                             java.lang.Object arg1)

### ignore

    public static void ignore(java.lang.Throwable thrown)

  Ignore an exception unless trace is enabled. This works around the problem that log4j does not support the trace level.

  Parameters:
    `thrown` - the Throwable to ignore

### info

    public static void info(java.lang.String msg)

### info

    public static void info(java.lang.String msg,
                            java.lang.Object arg)

### info

    public static void info(java.lang.String msg,
                            java.lang.Object arg0,
                            java.lang.Object arg1)

### isDebugEnabled

    public static boolean isDebugEnabled()

### warn

    public static void warn(java.lang.String msg)

### warn

    public static void warn(java.lang.String msg,
                            java.lang.Object arg)

### warn

    public static void warn(java.lang.String msg,
                            java.lang.Object arg0,
                            java.lang.Object arg1)

### warn

    public static void warn(java.lang.String msg,
                            java.lang.Throwable th)

### warn

    public static void warn(java.lang.Throwable th)

### getLogger

    public static Logger getLogger(java.lang.String name)

  Obtain a named Logger or the default Logger if null is passed.

  Parameters:
    `name` - the Logger name
  Returns:
    the Logger with the given name

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 1995-2010 Mort Bay Consulting. All Rights Reserved.