Package elf4j.engine.service
Class EventingLogService
- java.lang.Object
-
- elf4j.engine.service.EventingLogService
-
- All Implemented Interfaces:
LogService,PerformanceSensitive
public class EventingLogService extends Object implements LogService
converts a log request into an event for async processing
-
-
Constructor Summary
Constructors Constructor Description EventingLogService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanincludeCallerDetail()booleanincludeCallerThread()booleanisEnabled(NativeLogger nativeLogger)voidlog(@NonNull NativeLogger nativeLogger, @NonNull Class<?> serviceInterfaceClass, Throwable throwable, Object message, Object[] arguments)
-
-
-
Method Detail
-
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
-
isEnabled
public boolean isEnabled(NativeLogger nativeLogger)
- Specified by:
isEnabledin interfaceLogService- Parameters:
nativeLogger- to check for enablement- Returns:
- true if the logger's level is at or above configured minimum
-
log
public void log(@NonNull @NonNull NativeLogger nativeLogger, @NonNull @NonNull Class<?> serviceInterfaceClass, Throwable throwable, Object message, Object[] arguments)- Specified by:
login interfaceLogService- Parameters:
nativeLogger- the serviced loggerserviceInterfaceClass- The concrete logging service (logger) implementation class that the client calls directly at runtime to make log requests. For the native ELF4J service implementation, this is always theNativeLoggerclass; may be a different class if this core library is used to service other logging API. i.e. the real-time caller of this class is the logging service's "caller class" whose details (such as method and line number) if required by configuration, may need to be resolved by walking the runtime calling stack trace.throwable- to logmessage- to log, can have argument placeholders to be replaced by the values of the specified argumentsarguments- arguments whose values will replace the placeholders in the specified message
-
-