public class Log extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
INVALID_CHARS |
static String |
VALUE_SUPRESSED |
| Modifier and Type | Method and Description |
|---|---|
static void |
addTarget(Target target)
Adds a target to the log.
|
static boolean |
checkFilterToCategory(String filter,
String category)
Check whether the category match with the filter.
|
static void |
clear()
Clean up static member variables.
|
static Log |
createLog()
Creates the log on first access, returns already created log on
subsequent calls.
|
static void |
flush() |
static Logger |
getLogger(Log log,
String category) |
static Logger |
getLogger(String category)
Given a category, returns the logger associated with the category.
|
String[] |
getLoggers()
Return the categories for all of the loggers
|
static PrettyPrinter |
getPrettyPrinter() |
static Target |
getTarget(String searchId)
Returns the target associated with the unique ID searchId.
|
static short |
getTargetLevel() |
static Map |
getTargetMap()
Return the Log's map of targets keyed on their human-readable ids (e.g.
|
static List |
getTargets()
Returns an unmodifiable snapshot of the targets registered with this Log when the
method is invoked.
|
static boolean |
hasIllegalCharacters(String value) |
static void |
initialize(String id,
ConfigMap properties)
Initializes Log with id and properties.
|
static boolean |
isDebug()
Indicates whether a debug level log event will be processed by a log target.
|
static boolean |
isError()
Indicates whether an error level log event will be processed by a log target.
|
static boolean |
isExcludedProperty(String property)
Indicates whether a log property should be excluded.
|
static boolean |
isFatal()
Indicates whether a fatal level log event will be processed by a log target.
|
static boolean |
isInfo()
Indicates whether an info level log event will be processed by a log target.
|
static boolean |
isWarn()
Indicates whether a warn level log event will be processed by a log target.
|
static short |
readLevel(String l) |
static void |
removeTarget(Target target)
Removes a target from the log.
|
static void |
reset()
This method removes all of the current loggers and targets from the cache.
|
static void |
setPrettyPrinterClass(String value) |
public static final String INVALID_CHARS
public static final String VALUE_SUPRESSED
public static Log createLog()
public static void initialize(String id, ConfigMap properties)
id - Id for the Log which is ignored, though is used by the ManageableComponent superclassproperties - ConfigMap of properties for the Log.public static boolean isFatal()
public static boolean isError()
public static boolean isWarn()
public static boolean isInfo()
public static boolean isDebug()
public static boolean isExcludedProperty(String property)
property - the property to checkpublic static Logger getLogger(String category)
category - Categogry for the logger.public static List getTargets()
public static Map getTargetMap()
public static Target getTarget(String searchId)
searchId - the search IDpublic String[] getLoggers()
public static void addTarget(Target target)
target - Target to be added.public static void removeTarget(Target target)
target - The target to be removed.public static void reset()
public static void flush()
public static short readLevel(String l)
public static boolean hasIllegalCharacters(String value)
value - to check for illegal characters.
The following characters are not valid:
[]~$^&\/(){}<>+=`!#%?,:;'"@true if there are any illegal characters found,
false otherwisepublic static PrettyPrinter getPrettyPrinter()
public static short getTargetLevel()
public static void setPrettyPrinterClass(String value)
value - Name of the pretty printer class.public static boolean checkFilterToCategory(String filter, String category)
filter - The filter string to check against a specific categorycategory - The category which the filter could matchpublic static void clear()
Copyright © 2015 The Apache Software Foundation. All rights reserved.