org.eclipse.jetty.util.log
类 Log

java.lang.Object
  继承者 org.eclipse.jetty.util.log.Log

public class Log
extends 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.

另请参见:
StdErrLog, Slf4jLog

字段摘要
static boolean __ignored
          Legacy flag indicating if ignore(Throwable) methods produce any output in the Loggers
static String __logClass
          The Logger implementation class name
protected static Properties __props
          Logging Configuration Properties
static String EXCEPTION
           
static String IGNORED
           
 
构造方法摘要
Log()
           
 
方法摘要
static void debug(String msg)
          已过时。 anonymous logging is deprecated, use a named Logger obtained from getLogger(String)
static void debug(String msg, Object arg)
          已过时。 anonymous logging is deprecated, use a named Logger obtained from getLogger(String)
static void debug(String msg, Object arg0, Object arg1)
          已过时。 anonymous logging is deprecated, use a named Logger obtained from getLogger(String)
static void debug(Throwable th)
          已过时。 anonymous logging is deprecated, use a named Logger obtained from getLogger(String)
static Logger getLog()
          已过时。 anonymous logging is deprecated, use a named Logger obtained from getLogger(String)
static Logger getLogger(Class<?> clazz)
          Obtain a named Logger based on the fully qualified class name.
static Logger getLogger(String name)
          Obtain a named Logger or the default Logger if null is passed.
static Map<String,Logger> getLoggers()
          Get a map of all configured Logger instances.
static Logger getRootLogger()
          Get the root logger.
static void ignore(Throwable thrown)
          已过时。 anonymous logging is deprecated, use a named Logger obtained from getLogger(String)
static void info(String msg)
          已过时。 anonymous logging is deprecated, use a named Logger obtained from getLogger(String)
static void info(String msg, Object arg)
          已过时。 anonymous logging is deprecated, use a named Logger obtained from getLogger(String)
static void info(String msg, Object arg0, Object arg1)
          已过时。 anonymous logging is deprecated, use a named Logger obtained from getLogger(String)
static boolean initialized()
           
static boolean isDebugEnabled()
          已过时。 anonymous logging is deprecated, use a named Logger obtained from getLogger(String)
static void setLog(Logger log)
           
static void setLogToParent(String name)
          Set Log to parent Logger.
static void warn(String msg)
          已过时。 anonymous logging is deprecated, use a named Logger obtained from getLogger(String)
static void warn(String msg, Object arg)
          已过时。 anonymous logging is deprecated, use a named Logger obtained from getLogger(String)
static void warn(String msg, Object arg0, Object arg1)
          已过时。 anonymous logging is deprecated, use a named Logger obtained from getLogger(String)
static void warn(String msg, Throwable th)
          已过时。 anonymous logging is deprecated, use a named Logger obtained from getLogger(String)
static void warn(Throwable th)
          已过时。 anonymous logging is deprecated, use a named Logger obtained from getLogger(String)
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

字段详细信息

EXCEPTION

public static final String EXCEPTION
另请参见:
常量字段值

IGNORED

public static final String IGNORED
另请参见:
常量字段值

__props

protected static Properties __props
Logging Configuration Properties


__logClass

public static String __logClass
The Logger implementation class name


__ignored

public static boolean __ignored
Legacy flag indicating if ignore(Throwable) methods produce any output in the Loggers

构造方法详细信息

Log

public Log()
方法详细信息

initialized

public static boolean initialized()

setLog

public static void setLog(Logger log)

getLog

@Deprecated
public static Logger getLog()
已过时。 anonymous logging is deprecated, use a named Logger obtained from getLogger(String)


getRootLogger

public static Logger getRootLogger()
Get the root logger.

返回:
the root logger

setLogToParent

public static void setLogToParent(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));
 

参数:
name - Logger name

debug

@Deprecated
public static void debug(Throwable th)
已过时。 anonymous logging is deprecated, use a named Logger obtained from getLogger(String)


debug

@Deprecated
public static void debug(String msg)
已过时。 anonymous logging is deprecated, use a named Logger obtained from getLogger(String)


debug

@Deprecated
public static void debug(String msg,
                                    Object arg)
已过时。 anonymous logging is deprecated, use a named Logger obtained from getLogger(String)


debug

@Deprecated
public static void debug(String msg,
                                    Object arg0,
                                    Object arg1)
已过时。 anonymous logging is deprecated, use a named Logger obtained from getLogger(String)


ignore

@Deprecated
public static void ignore(Throwable thrown)
已过时。 anonymous logging is deprecated, use a named Logger obtained from getLogger(String)


info

@Deprecated
public static void info(String msg)
已过时。 anonymous logging is deprecated, use a named Logger obtained from getLogger(String)


info

@Deprecated
public static void info(String msg,
                                   Object arg)
已过时。 anonymous logging is deprecated, use a named Logger obtained from getLogger(String)


info

@Deprecated
public static void info(String msg,
                                   Object arg0,
                                   Object arg1)
已过时。 anonymous logging is deprecated, use a named Logger obtained from getLogger(String)


isDebugEnabled

@Deprecated
public static boolean isDebugEnabled()
已过时。 anonymous logging is deprecated, use a named Logger obtained from getLogger(String)


warn

@Deprecated
public static void warn(String msg)
已过时。 anonymous logging is deprecated, use a named Logger obtained from getLogger(String)


warn

@Deprecated
public static void warn(String msg,
                                   Object arg)
已过时。 anonymous logging is deprecated, use a named Logger obtained from getLogger(String)


warn

@Deprecated
public static void warn(String msg,
                                   Object arg0,
                                   Object arg1)
已过时。 anonymous logging is deprecated, use a named Logger obtained from getLogger(String)


warn

@Deprecated
public static void warn(String msg,
                                   Throwable th)
已过时。 anonymous logging is deprecated, use a named Logger obtained from getLogger(String)


warn

@Deprecated
public static void warn(Throwable th)
已过时。 anonymous logging is deprecated, use a named Logger obtained from getLogger(String)


getLogger

public static Logger getLogger(Class<?> clazz)
Obtain a named Logger based on the fully qualified class name.

参数:
clazz - the class to base the Logger name off of
返回:
the Logger with the given name

getLogger

public static Logger getLogger(String name)
Obtain a named Logger or the default Logger if null is passed.

参数:
name - the Logger name
返回:
the Logger with the given name

getLoggers

public static Map<String,Logger> getLoggers()
Get a map of all configured Logger instances.

返回:
a map of all configured Logger instances


Copyright © 2013. All Rights Reserved.