Class Log
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.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic boolean
Legacy flag indicating ifLogger.ignore(Throwable)
methods produce any output in theLogger
sprivate static boolean
static String
TheLogger
implementation class nameprivate static final ConcurrentMap<String,
Logger> protected static final Properties
Logging Configuration Propertiesstatic final String
static final String
private static Logger
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Logger
getLog()
static Logger
Obtain a named Logger based on the fully qualified class name.static Logger
Obtain a named Logger or the default Logger if null is passed.Get a map of all configuredLogger
instances.(package private) static ConcurrentMap<String,
Logger> static Properties
static Logger
Get the root logger.static void
private static void
(package private) static boolean
private static void
loadProperties
(String resourceName, Properties props) static void
Set the root logger.static void
setLogToParent
(String name) Set Log to parent Logger.
-
Field Details
-
EXCEPTION
- See Also:
-
IGNORED
- See Also:
-
__logClass
TheLogger
implementation class name -
__ignored
public static boolean __ignoredLegacy flag indicating ifLogger.ignore(Throwable)
methods produce any output in theLogger
s -
__props
Logging Configuration Properties -
__loggers
-
__initialized
private static boolean __initialized -
LOG
-
-
Constructor Details
-
Log
public Log()
-
-
Method Details
-
loadProperties
-
initialized
public static void initialized() -
initStandardLogging
-
getLog
-
setLog
Set the root logger.Note that if any classes have statically obtained their logger instance prior to this call, their Logger will not be affected by this call.
- Parameters:
log
- the root logger implementation to set
-
getRootLogger
Get the root logger.- Returns:
- the root logger
-
isIgnored
static boolean isIgnored() -
setLogToParent
Set Log to parent Logger.If there is a different Log class available from a parent classloader, call
getLogger(String)
on it and construct aLoggerLog
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
-
getLogger
Obtain a named Logger based on the fully qualified class name.- Parameters:
clazz
- the class to base the Logger name off of- Returns:
- the Logger with the given name
-
getLogger
Obtain a named Logger or the default Logger if null is passed.- Parameters:
name
- the Logger name- Returns:
- the Logger with the given name
-
getMutableLoggers
-
getLoggers
Get a map of all configuredLogger
instances.- Returns:
- a map of all configured
Logger
instances
-
getProperties
-