Package elf4j.engine.service.pattern
Class MethodPattern
- java.lang.Object
-
- elf4j.engine.service.pattern.MethodPattern
-
- All Implemented Interfaces:
LogPattern,PerformanceSensitive
public class MethodPattern extends Object implements LogPattern
-
-
Constructor Summary
Constructors Constructor Description MethodPattern()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static MethodPatternfrom(String patternSegment)booleanincludeCallerDetail()booleanincludeCallerThread()voidrender(@NonNull LogEvent logEvent, @NonNull StringBuilder target)Extracts the content of particular interest to this log pattern instance from the specified log event, and appends the result to the specified target aggregator of the final log message
-
-
-
Method Detail
-
from
@Nonnull public static MethodPattern from(String patternSegment)
- Parameters:
patternSegment- text segment to convert- Returns:
- converted patternSegment object
-
includeCallerDetail
public boolean includeCallerDetail()
- Specified by:
includeCallerDetailin interfacePerformanceSensitive- Returns:
- true if log should include caller detail such as method, line number...
-
includeCallerThread
public boolean includeCallerThread()
- Specified by:
includeCallerThreadin interfacePerformanceSensitive- Returns:
- true if log should include call thread information such thread name and id
-
render
public void render(@NonNull @NonNull LogEvent logEvent, @NonNull @NonNull StringBuilder target)Description copied from interface:LogPatternExtracts the content of particular interest to this log pattern instance from the specified log event, and appends the result to the specified target aggregator of the final log message- Specified by:
renderin interfaceLogPattern- Parameters:
logEvent- entire log content data source to rendertarget- logging text aggregator of the final log message
-
-