Class EventingLogService

    • Constructor Detail

      • EventingLogService

        public EventingLogService()
    • Method Detail

      • includeCallerDetail

        public boolean includeCallerDetail()
        Specified by:
        includeCallerDetail in interface PerformanceSensitive
        Returns:
        true if log should include caller detail such as method, line number...
      • includeCallerThread

        public boolean includeCallerThread()
        Specified by:
        includeCallerThread in interface PerformanceSensitive
        Returns:
        true if log should include call thread information such thread name and id
      • isEnabled

        public boolean isEnabled​(NativeLogger nativeLogger)
        Specified by:
        isEnabled in interface LogService
        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:
        log in interface LogService
        Parameters:
        nativeLogger - the serviced logger
        serviceInterfaceClass - 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 the NativeLogger class; 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 log
        message - to log, can have argument placeholders to be replaced by the values of the specified arguments
        arguments - arguments whose values will replace the placeholders in the specified message