Package org.eclipse.jetty.util.log
Class AbstractLogger
- java.lang.Object
-
- org.eclipse.jetty.util.log.AbstractLogger
-
-
Field Summary
Fields Modifier and Type Field Description static int
LEVEL_ALL
static int
LEVEL_DEBUG
static int
LEVEL_DEFAULT
static int
LEVEL_INFO
static int
LEVEL_OFF
static int
LEVEL_WARN
-
Constructor Summary
Constructors Constructor Description AbstractLogger()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected static java.lang.String
condensePackageString(java.lang.String classname)
Condenses a classname by stripping down the package name to just the first character of each package name segment.Configuredvoid
debug(java.lang.String msg, long arg)
Formats and logs at debug level.protected static int
getLevelId(java.lang.String levelSegment, java.lang.String levelName)
Logger
getLogger(java.lang.String name)
static java.lang.String
getLoggingProperty(java.util.Properties props, java.lang.String name, java.lang.String property)
static int
lookupLoggingLevel(java.util.Properties props, java.lang.String name)
Get the Logging Level for the provided log name.protected abstract Logger
newLogger(java.lang.String fullname)
-
-
-
Field Detail
-
LEVEL_DEFAULT
public static final int LEVEL_DEFAULT
- See Also:
- Constant Field Values
-
LEVEL_ALL
public static final int LEVEL_ALL
- See Also:
- Constant Field Values
-
LEVEL_DEBUG
public static final int LEVEL_DEBUG
- See Also:
- Constant Field Values
-
LEVEL_INFO
public static final int LEVEL_INFO
- See Also:
- Constant Field Values
-
LEVEL_WARN
public static final int LEVEL_WARN
- See Also:
- Constant Field Values
-
LEVEL_OFF
public static final int LEVEL_OFF
- See Also:
- Constant Field Values
-
-
Method Detail
-
getLogger
public final Logger getLogger(java.lang.String name)
-
newLogger
protected abstract Logger newLogger(java.lang.String fullname)
-
lookupLoggingLevel
public static int lookupLoggingLevel(java.util.Properties props, java.lang.String name)
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
public static java.lang.String getLoggingProperty(java.util.Properties props, java.lang.String name, java.lang.String property)
-
getLevelId
protected static int getLevelId(java.lang.String levelSegment, java.lang.String levelName)
-
condensePackageString
protected static java.lang.String condensePackageString(java.lang.String classname)
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
-
-