congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
Log
Code IndexAdd Tabnine to your IDE (free)

How to use
Log
in
com.aerospike.client

Best Java code snippets using com.aerospike.client.Log (Showing top 20 results out of 315)

origin: aerospike/aerospike-client-java

public Console() {
  Log.setLevel(Level.INFO);
  Log.setCallback(this);
}
origin: com.aerospike/aerospike-client

public LuaValue read() {
  try {
    return queue.take();
  }
  catch (InterruptedException ie) {
    if (Log.debugEnabled()) {
      Log.debug("LuaInputStream take interrupted");
    }
    return LuaValue.NIL;
  }
}
origin: aerospike/aerospike-client-java

  if (Log.infoEnabled()) {
    Log.info("Remove node " + node);
if (Log.warnEnabled()) {
  Log.warn("Node remove mismatch. Expected " + nodeArray.length + " Received " + count);
origin: aerospike/aerospike-client-java

  private void expire() {
    try {
      task.timeout();
    } catch (Throwable t) {
      if (Log.warnEnabled()) {
        Log.warn("task.timeout() failed: " + t.getMessage());
      }
    }
  }
}
origin: com.aerospike/aerospike-client

/**
 * Add nodes using copy on write semantics.
 */
private final void addNodes(HashMap<String,Node> nodesToAdd) {
  // Add all nodes at once to avoid copying entire array multiple times.
  // Create temporary nodes array.
  Node[] nodeArray = new Node[nodes.length + nodesToAdd.size()];
  int count = 0;
  // Add existing nodes.
  for (Node node : nodes) {
    nodeArray[count++] = node;
  }
  // Add new nodes.
  for (Node node : nodesToAdd.values()) {
    if (Log.infoEnabled()) {
      Log.info("Add node " + node);
    }
    nodeArray[count++] = node;
    nodesMap.put(node.getName(), node);
    // Add node's aliases to global alias set.
    // Aliases are only used in tend thread, so synchronization is not necessary.
    for (Host alias : node.aliases) {
      aliases.put(alias, node);
    }
  }
  // Replace nodes with copy.
  nodes = nodeArray;
}
origin: aerospike/aerospike-client-java

if (Log.debugEnabled()) {
  Log.debug("Update peers for node " + this);
        if (Log.warnEnabled()) {
          Log.warn("Peer node " + peer.nodeName + " is different than actual node " + nv.name + " for host " + host);
      if (Log.warnEnabled()) {
        Log.warn("Add node " + host + " failed: " + Util.getErrorMessage(e));
origin: spring-projects/spring-data-aerospike

private void loggerSetup() {
  final Logger log = LoggerFactory.getLogger(AerospikeQueryCreator.class);
  com.aerospike.client.Log
      .setCallback(new com.aerospike.client.Log.Callback() {
        @Override
        public void log(com.aerospike.client.Log.Level level,
            String message) {
          switch (level) {
          case INFO:
            log.info("AS: {}", message);
            break;
          case DEBUG:
            log.debug("AS: {}", message);
            break;
          case ERROR:
            log.error("AS: {}", message);
            break;
          case WARN:
            log.warn("AS: {}", message);
            break;
          }
        }
      });
}
origin: com.aerospike/aerospike-client

private final void notifyFailure(AerospikeException ae) {
  try {
    ae.setNode(command.node);
    ae.setIteration(iteration);
    ae.setInDoubt(command.isRead, commandSentCounter);
    if (Log.debugEnabled()) {
      Command.LogPolicy(command.policy);
    }
    command.onFailure(ae);
  }
  catch (Exception e) {
    Log.error("onFailure() error: " + Util.getErrorMessage(e));
  }
}
origin: com.aerospike/aerospike-client

/**
 * Log a warning message.
 *
 * @param message        message string not terminated with a newline
 */
public static void warn(String message) {
  log(Level.WARN, message);
}
origin: com.aerospike/aerospike-client

protected final void finish() {
  complete();
  try {
    command.onSuccess();
  }
  catch (Exception e) {
    Log.error("onSuccess() error: " + Util.getErrorMessage(e));
  }
  eventLoop.tryDelayQueue();
}
origin: aerospike/aerospike-client-java

Log.setLevel(Level.DEBUG);
origin: com.aerospike/aerospike-client

Log.warn(message);
origin: com.aerospike/aerospike-client

public static void LogPolicy(Policy p) {
  Log.debug("Policy: " + "socketTimeout=" + p.socketTimeout + " totalTimeout=" + p.totalTimeout + " maxRetries=" + p.maxRetries +
      " sleepBetweenRetries=" + p.sleepBetweenRetries);
}
origin: aerospike/aerospike-client-java

public final void printPartitionMap() {
  for (Entry<String,Partitions> entry : partitionMap.entrySet()) {
    String namespace = entry.getKey();
    Partitions partitions = entry.getValue();
    AtomicReferenceArray<Node>[] replicas = partitions.replicas;
    for (int i = 0; i < replicas.length; i++) {
      AtomicReferenceArray<Node> nodeArray = replicas[i];
      int max = nodeArray.length();
      for (int j = 0; j < max; j++) {
        Node node = nodeArray.get(j);
        if (node != null) {
          Log.info(namespace + ',' + i + ',' + j + ',' + node);
        }
      }
    }
  }
}
origin: aerospike/aerospike-client-java

    ae.setInDoubt(isRead, commandSentCounter);
    if (Log.debugEnabled()) {
      LogPolicy(policy);
exception.setInDoubt(isRead, commandSentCounter);
if (Log.debugEnabled()) {
  LogPolicy(policy);
origin: com.aerospike/aerospike-client

  private void expire() {
    try {
      task.timeout();
    } catch (Throwable t) {
      if (Log.warnEnabled()) {
        Log.warn("task.timeout() failed: " + t.getMessage());
      }
    }
  }
}
origin: aerospike/aerospike-client-java

/**
 * Add nodes using copy on write semantics.
 */
private final void addNodes(HashMap<String,Node> nodesToAdd) {
  // Add all nodes at once to avoid copying entire array multiple times.
  // Create temporary nodes array.
  Node[] nodeArray = new Node[nodes.length + nodesToAdd.size()];
  int count = 0;
  // Add existing nodes.
  for (Node node : nodes) {
    nodeArray[count++] = node;
  }
  // Add new nodes.
  for (Node node : nodesToAdd.values()) {
    if (Log.infoEnabled()) {
      Log.info("Add node " + node);
    }
    nodeArray[count++] = node;
    nodesMap.put(node.getName(), node);
    // Add node's aliases to global alias set.
    // Aliases are only used in tend thread, so synchronization is not necessary.
    for (Host alias : node.aliases) {
      aliases.put(alias, node);
    }
  }
  // Replace nodes with copy.
  nodes = nodeArray;
}
origin: com.aerospike/aerospike-client

if (Log.debugEnabled()) {
  Log.debug("Update peers for node " + this);
        if (Log.warnEnabled()) {
          Log.warn("Peer node " + peer.nodeName + " is different than actual node " + nv.name + " for host " + host);
      if (Log.warnEnabled()) {
        Log.warn("Add node " + host + " failed: " + Util.getErrorMessage(e));
origin: com.aerospike/aerospike-client

private final void notifyFailure(AerospikeException ae) {
  try {
    ae.setNode(command.node);
    ae.setIteration(iteration);
    ae.setInDoubt(command.isRead, commandSentCounter);
    if (Log.debugEnabled()) {
      Command.LogPolicy(command.policy);
    }
    command.onFailure(ae);
  }
  catch (Exception e) {
    Log.error("onFailure() error: " + Util.getErrorMessage(e));
  }
}
origin: aerospike/aerospike-client-java

/**
 * Log an error message. 
 * 
 * @param message        message string not terminated with a newline
 */
public static void error(String message) {
  log(Level.ERROR, message);
}
com.aerospike.clientLog

Javadoc

Aerospike client logging facility. Logs can be filtered and message callbacks can be defined to control how log messages are written.

Most used methods

  • setCallback
    Set optional log callback implementation. If the callback is not defined (or null), log messages wil
  • setLevel
    Set log level filter.
  • debug
    Log an debug message.
  • debugEnabled
    Determine if debug log level is enabled.
  • error
    Log an error message.
  • info
    Log an info message.
  • infoEnabled
    Determine if info log level is enabled.
  • log
    Filter and forward message to callback.
  • warn
    Log a warning message.
  • warnEnabled
    Determine if warning log level is enabled.

Popular in Java

  • Creating JSON documents from java classes using gson
  • getSharedPreferences (Context)
  • getApplicationContext (Context)
  • setContentView (Activity)
  • FileInputStream (java.io)
    An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • JarFile (java.util.jar)
    JarFile is used to read jar entries and their associated data from jar files.
  • Collectors (java.util.stream)
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now