Package org.eclipse.jetty.util.log
Class AbstractLogger
java.lang.Object
org.eclipse.jetty.util.log.AbstractLogger
- All Implemented Interfaces:
Logger
- Direct Known Subclasses:
JavaUtilLog
,LoggerLog
,Slf4jLog
,StdErrLog
Abstract Logger.
Manages the atomic registration of the logger by name.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
static final int
static final int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static String
condensePackageString
(String classname) Condenses a classname by stripping down the package name to just the first character of each package name segment.Configuredvoid
Formats and logs at debug level.protected static int
getLevelId
(String levelSegment, String levelName) final Logger
static String
getLoggingProperty
(Properties props, String name, String property) private static boolean
A more robust form of name blank test.static int
lookupLoggingLevel
(Properties props, String name) Get the Logging Level for the provided log name.protected abstract Logger
-
Field Details
-
LEVEL_DEFAULT
public static final int LEVEL_DEFAULT- See Also:
-
LEVEL_ALL
public static final int LEVEL_ALL- See Also:
-
LEVEL_DEBUG
public static final int LEVEL_DEBUG- See Also:
-
LEVEL_INFO
public static final int LEVEL_INFO- See Also:
-
LEVEL_WARN
public static final int LEVEL_WARN- See Also:
-
LEVEL_OFF
public static final int LEVEL_OFF- See Also:
-
-
Constructor Details
-
AbstractLogger
public AbstractLogger()
-
-
Method Details
-
getLogger
-
newLogger
-
isBlank
A more robust form of name blank test. Will return true for null names, and names that have only whitespace- Parameters:
name
- the name to test- Returns:
- true for null or blank name, false if any non-whitespace character is found.
-
lookupLoggingLevel
Get the Logging Level for the provided log name. Using the FQCN first, then each package segment from longest to shortest.- Parameters:
props
- the properties to checkname
- the name to get log for- Returns:
- the logging level
-
getLoggingProperty
-
getLevelId
-
condensePackageString
Condenses a classname by stripping down the package name to just the first character of each package name segment.ConfiguredExamples: "org.eclipse.jetty.test.FooTest" = "oejt.FooTest" "org.eclipse.jetty.server.logging.LogTest" = "orjsl.LogTest"
- Parameters:
classname
- the fully qualified class name- Returns:
- the condensed name
-
debug
Description copied from interface:Logger
Formats and logs at debug level. avoids autoboxing of integers
-