Class MethodLogConfiguration
java.lang.Object
com.foreach.across.modules.logging.method.MethodLogConfiguration
- Author:
- Arne Vandamme
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic MethodLogConfiguration
all
(int minimumDuration) Creates a default method log configuration that enables method logging for all loggers, with the set minimum duration.int
int
getMinimumDuration
(String loggerName) boolean
boolean
void
register
(MethodLogger methodLogger) void
setDefaultMinimumDuration
(int defaultMinimumDuration) void
setEnabled
(boolean enabled) void
setEnabled
(String loggerName, boolean enabled) Set enabled status for a specific logger.void
setMinimumDuration
(String loggerName, int minimumDuration)
-
Field Details
-
WILDCARD
- See Also:
-
-
Constructor Details
-
MethodLogConfiguration
public MethodLogConfiguration()
-
-
Method Details
-
isEnabled
public boolean isEnabled()- Returns:
- true if method logging in general is enabled
-
setEnabled
public void setEnabled(boolean enabled) -
getDefaultMinimumDuration
public int getDefaultMinimumDuration() -
setDefaultMinimumDuration
public void setDefaultMinimumDuration(int defaultMinimumDuration) -
setEnabled
Set enabled status for a specific logger. Only if the globalisEnabled()
istrue
can any logger be enabled. If you want the default status for unspecified loggers to be set, use theWILDCARD
token as logger name.- Parameters:
loggerName
- of the specific loggerenabled
- true if logging is active
-
setMinimumDuration
-
isEnabled
-
getMinimumDuration
-
register
-
all
Creates a default method log configuration that enables method logging for all loggers, with the set minimum duration.- Parameters:
minimumDuration
- for the method logging- Returns:
- modifiable configuration
-