Class ILogEventLogger

java.lang.Object
com.iizix.server.geo.ip2location.ILogEventLogger
All Implemented Interfaces:
IEventLogger

public final class ILogEventLogger extends Object implements IEventLogger
The IEventLogger of the IIZI server: routes every IP2Location event to ILog under the originating class, INFO as INFO, WARNING as WARNING and ERROR (and any unknown level) as SEVERE. An exception travels as the Throwable argument of the log call, so the server log keeps its stack trace formatting instead of an appended text copy - except at INFO and WARNING a failure of the network (ILog.isNetworkFailure(Throwable): a download that could not reach IP2Location's server), which is one line with ILog.brief(Throwable): its stack trace shows only the network library.

Stateless and thread-safe; one instance is shared by the manager and every service it creates.

Author:
Christopher Mindus
  • Constructor Details

    • ILogEventLogger

      public ILogEventLogger()
  • Method Details

    • logEvent

      public void logEvent(Class<?> callerClass, int type, String message, Throwable ex)
      Logs an event with an optional exception.
      Specified by:
      logEvent in interface IEventLogger
      Parameters:
      callerClass - The class that generated the log event, null is logged under this class.
      type - The event type: IEventLogger.INFO, IEventLogger.WARNING or IEventLogger.ERROR; anything else is logged as SEVERE.
      message - The log message, null is logged as an empty message.
      ex - An exception associated with the event, or null.