public class Log
extends java.lang.Object
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.
Modifier and Type | Field and Description |
---|---|
static boolean |
__ignored
Legacy flag indicating if
Logger.ignore(Throwable) methods produce any output in the Logger s |
private static boolean |
__initialized |
static java.lang.String |
__logClass
The
Logger implementation class name |
private static java.util.concurrent.ConcurrentMap<java.lang.String,Logger> |
__loggers
Hold loggers only.
|
protected static java.util.Properties |
__props
Logging Configuration Properties
|
static java.lang.String |
EXCEPTION |
static java.lang.String |
IGNORED |
private static Logger |
LOG |
Constructor and Description |
---|
Log() |
Modifier and Type | Method and Description |
---|---|
static Logger |
getLog() |
static Logger |
getLogger(java.lang.Class<?> clazz)
Obtain a named Logger based on the fully qualified class name.
|
static Logger |
getLogger(java.lang.String name)
Obtain a named Logger or the default Logger if null is passed.
|
static java.util.Map<java.lang.String,Logger> |
getLoggers()
Get a map of all configured
Logger instances. |
(package private) static java.util.concurrent.ConcurrentMap<java.lang.String,Logger> |
getMutableLoggers() |
static java.util.Properties |
getProperties() |
static Logger |
getRootLogger()
Get the root logger.
|
static void |
initialized() |
private static void |
initStandardLogging(java.lang.Throwable e) |
(package private) static boolean |
isIgnored() |
(package private) static void |
loadProperties(java.lang.String resourceName,
java.util.Properties props) |
static void |
setLog(Logger log)
Set the root logger.
|
static void |
setLogToParent(java.lang.String name)
Set Log to parent Logger.
|
public static final java.lang.String EXCEPTION
public static final java.lang.String IGNORED
protected static final java.util.Properties __props
public static java.lang.String __logClass
Logger
implementation class namepublic static boolean __ignored
Logger.ignore(Throwable)
methods produce any output in the Logger
sprivate static final java.util.concurrent.ConcurrentMap<java.lang.String,Logger> __loggers
private static Logger LOG
private static boolean __initialized
static void loadProperties(java.lang.String resourceName, java.util.Properties props)
public static void initialized()
private static void initStandardLogging(java.lang.Throwable e)
public static Logger getLog()
public static void setLog(Logger log)
Note that if any classes have statically obtained their logger instance prior to this call, their Logger will not be affected by this call.
log
- the root logger implementation to setpublic static Logger getRootLogger()
static boolean isIgnored()
public static void setLogToParent(java.lang.String name)
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 namepublic static Logger getLogger(java.lang.Class<?> clazz)
clazz
- the class to base the Logger name off ofpublic static Logger getLogger(java.lang.String name)
name
- the Logger namestatic java.util.concurrent.ConcurrentMap<java.lang.String,Logger> getMutableLoggers()
@ManagedAttribute(value="list of all instantiated loggers") public static java.util.Map<java.lang.String,Logger> getLoggers()
Logger
instances.Logger
instancespublic static java.util.Properties getProperties()