Class Log
java.lang.Object
org.eclipse.jetty.util.log.Log
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:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic booleanLegacy flag indicating ifLogger.ignore(Throwable)methods produce any output in theLoggersprivate static booleanstatic StringTheLoggerimplementation class nameprivate static final ConcurrentMap<String, Logger> protected static final PropertiesLogging Configuration Propertiesstatic final Stringstatic final Stringprivate static Logger -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic LoggergetLog()static LoggerObtain a named Logger based on the fully qualified class name.static LoggerObtain a named Logger or the default Logger if null is passed.Get a map of all configuredLoggerinstances.(package private) static ConcurrentMap<String, Logger> static Propertiesstatic LoggerGet the root logger.static voidprivate static void(package private) static booleanprivate static voidloadProperties(String resourceName, Properties props) static voidSet the root logger.static voidsetLogToParent(String name) Set Log to parent Logger.
-
Field Details
-
EXCEPTION
- See Also:
-
IGNORED
- See Also:
-
__logClass
-
__ignored
public static boolean __ignoredLegacy flag indicating ifLogger.ignore(Throwable)methods produce any output in theLoggers -
__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
-
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 aLoggerLoginstance 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
-
getLogger
-
getMutableLoggers
-
getLoggers
-
getProperties
-