Class Log

java.lang.Object
com.aerospike.client.Log

public final class Log extends Object
Aerospike client logging facility. Logs can be filtered and message callbacks can be defined to control how log messages are written.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static interface 
    An object implementing this interface may be passed in to setCallback(), so the caller can channel Aerospike client logs as desired.
    static enum 
    Log escalation level.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Log()
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    debug(String message)
    Log an debug message.
    static boolean
    Determine if debug log level is enabled.
    static void
    error(String message)
    Log an error message.
    static boolean
    Determine if error log level is enabled.
    static void
    info(String message)
    Log an info message.
    static boolean
    Determine if info log level is enabled.
    static boolean
    Determine if the log callback default (null - disable logging) has been overridden by the user.
    static void
    log(Log.Level level, String message)
    Filter and forward message to callback.
    static void
    Set log callback.
    static void
    Log messages to terminal standard output with timestamp, level and message.
    static void
    Set log level filter.
    static void
    warn(String message)
    Log a warning message.
    static boolean
    Determine if warning log level is enabled.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Log

      public Log()
  • Method Details

    • setLevel

      public static void setLevel(Log.Level level)
      Set log level filter.
      Parameters:
      level - only show logs at this or more urgent level
    • setCallback

      public static void setCallback(Log.Callback callback)
      Set log callback. To silence the log, set callback to null.
      Parameters:
      callback - Log.Callback implementation
    • setCallbackStandard

      public static void setCallbackStandard()
      Log messages to terminal standard output with timestamp, level and message.
    • isSet

      public static boolean isSet()
      Determine if the log callback default (null - disable logging) has been overridden by the user. Return true if the user explicitly defined a callback or disabled logging by setting the log callback to null. Return false if the log callback default was not overridden by the user.
    • errorEnabled

      public static boolean errorEnabled()
      Determine if error log level is enabled.
    • warnEnabled

      public static boolean warnEnabled()
      Determine if warning log level is enabled.
    • infoEnabled

      public static boolean infoEnabled()
      Determine if info log level is enabled.
    • debugEnabled

      public static boolean debugEnabled()
      Determine if debug log level is enabled.
    • error

      public static void error(String message)
      Log an error message.
      Parameters:
      message - message string not terminated with a newline
    • warn

      public static void warn(String message)
      Log a warning message.
      Parameters:
      message - message string not terminated with a newline
    • info

      public static void info(String message)
      Log an info message.
      Parameters:
      message - message string not terminated with a newline
    • debug

      public static void debug(String message)
      Log an debug message.
      Parameters:
      message - message string not terminated with a newline
    • log

      public static void log(Log.Level level, String message)
      Filter and forward message to callback.
      Parameters:
      level - message severity level
      message - message string not terminated with a newline