congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
Logger
Code IndexAdd Tabnine to your IDE (free)

How to use
Logger
in
org.vertx.java.core.logging

Best Java code snippets using org.vertx.java.core.logging.Logger (Showing top 20 results out of 315)

origin: io.vertx/vertx-platform

private void deployHADeployments() {
 int size = toDeployOnQuorum.size();
 if (size != 0) {
  log.info("There are " + size + " HA deployments waiting on a quorum. These will now be deployed");
  Runnable task;
  while ((task = toDeployOnQuorum.poll()) != null) {
   try {
    task.run();
   } catch (Throwable t) {
    log.error("Failed to run redeployment task", t);
   }
  }
 }
}
origin: org.vert-x/vertx-core

 public void handle(AsyncResult<Boolean> res) {
  if (res.succeeded()) {
   if (res.result) {
    cacheAuthorisation(sessionID, sock);
    checkAndSend(send, address, jsonObject, sock, replyAddress);
   } else {
    log.debug("Inbound message for address " + address + " rejected because sessionID is not authorised");
   }
  } else {
   log.error("Error in performing authorisation", res.exception);
  }
 }
});
origin: org.vert-x/vertx-core

 public void handle(HttpServerRequest req) {
  if (log.isTraceEnabled()) log.trace("Request: " + req.uri + " does not match, returning 404");
  req.response.statusCode = 404;
  req.response.end();
 }
});
origin: org.vert-x/vertx-core

private void logInternal(final String perms) {
  if ((perms != null) && log.isDebugEnabled()) {
    log.debug("You are running on Windows and POSIX style file permissions are not supported");
  }
}
origin: com.englishtown/vertx-mod-hk2

@Override
public void reportException(Logger logger, Throwable t) {
  if (logger != null) {
    logger.error("Exception in HK2VerticleFactory", t);
  }
}
origin: org.vert-x/vertx-platform

log.warn("Overflow event on watched directory");
continue;
   registerAll(moduleDir, child);
  } catch (IOException e) {
   log.error("Failed to register child", e);
   throw new IllegalStateException(e.getMessage());
origin: io.vertx/vertx-testframework

@Test
protected void runTestInLoop(String testName, int iters) throws Exception {
 Method meth = getClass().getMethod(testName, (Class<?>[])null);
 for (int i = 0; i < iters; i++) {
  log.info("****************************** ITER " + i);
  meth.invoke(this);
  tearDown();
  if (i != iters - 1) {
   setUp();
  }
 }
}
origin: io.vertx/vertx-platform

private void unzipModule(final ModuleIdentifier modID, final ModuleZipInfo zipInfo, boolean deleteZip) {
 // We synchronize to prevent a race whereby it tries to unzip the same module at the
 // same time (e.g. deployModule for the same module name has been called in parallel)
 String modName = modID.toString();
 synchronized (modName.intern()) {
  checkCreateModDirs();
  File fdest = new File(modRoot, modName);
  File sdest = new File(systemModRoot, modName);
  if (fdest.exists() || sdest.exists()) {
   // This can happen if the same module is requested to be installed
   // at around the same time
   // It's ok if this happens
   log.warn("Module " + modID + " is already installed");
   return;
  }
  // Unzip into temp dir first
  File tdest = unzipIntoTmpDir(zipInfo, deleteZip);
  // Check if it's a system module
  JsonObject conf = loadModuleConfig(createModJSONFile(tdest), modID);
  ModuleFields fields = new ModuleFields(conf);
  boolean system = fields.isSystem();
  // Now copy it to the proper directory
  String moveFrom = tdest.getAbsolutePath();
  safeMove(moveFrom, system ? sdest.getAbsolutePath() : fdest.getAbsolutePath());
  log.info("Module " + modID +" successfully installed");
 }
}
origin: org.vert-x/vertx-core

 public void handle(HttpServerRequest req) {
  try {
   if (log.isTraceEnabled()) log.trace("In Iframe handler");
   if (etag != null && etag.equals(req.headers().get("if-none-match"))) {
    req.response.statusCode = 304;
    req.response.end();
   } else {
    req.response.headers().put("Content-Type", "text/html; charset=UTF-8");
    req.response.headers().put("Cache-Control", "public,max-age=31536000");
    long oneYear = 365 * 24 * 60 * 60 * 1000;
    String expires = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss zzz").format(new Date(System.currentTimeMillis() + oneYear));
    req.response.headers().put("Expires", expires);
    req.response.headers().put("ETag", etag);
    req.response.end(iframeHTML);
   }
  } catch (Exception e) {
   log.error("Failed to server iframe", e);
  }
 }
};
origin: org.vert-x/vertx-core

 public void handle(final Message<JsonObject> msg) {
  Match curMatch = checkMatches(false, address, msg.body);
  if (curMatch.doesMatch) {
   if (curMatch.requiresAuth && sockAuths.get(sock) == null) {
    log.debug("Outbound message for address " + address + " rejected because auth is required and socket is not authed");
   } else {
    checkAddAccceptedReplyAddress(msg.replyAddress);
    deliverMessage(sock, address, msg);
   }
  } else {
   log.debug("Outbound message for address " + address + " rejected because there is no inbound match");
  }
 }
};
origin: org.vert-x/vertx-platform

public synchronized void close() {
 vertx.cancelTimer(timerID);
 Set<Deployment>  deps = new HashSet<>();
 for (Map.Entry<Path, Set<Deployment>> entry: watchedDeployments.entrySet()) {
  deps.addAll(entry.getValue());
 }
 toUndeploy.addAll(deps);
 processUndeployments();
 try {
     watchService.close();
   } catch (IOException ex) {
     log.warn("Error while shutting down watch service: " + ex.getMessage(), ex);
   }
 closed = true;
}
origin: org.vert-x/vertx-core

public synchronized void report() {
 log.trace("available: " + available.size() + " connection count: " + connectionCount + " waiters: " + waiters.size());
}
origin: org.vert-x/vertx-core

 public void handle(AsyncResult<Void> event) {
  if (event.exception != null) {
   log.error("Failed to remove entry", event.exception);
  }
 }
};
origin: org.vert-x/vertx-platform

 is = getClass().getClassLoader().getResourceAsStream("langs.properties");
 if (is == null) {
  log.warn("No language mappings found!");
 } else {
  Properties props = new Properties();
 log.error("Failed to load langs.properties: " + e.getMessage());
} finally {
 if (is != null) {
origin: io.vertx/vertx-platform

private void fatJar(String modName, Args args) {
 log.info("Attempting to make a fat jar for module " + modName);
 String directory = args.map.get("-d");
 if (directory != null && !new File(directory).exists()) {
  log.info("Directory does not exist: " + directory);
  return;
 }
 createPM().makeFatJar(modName, directory, createLoggingHandler("making fat jar", unblockHandler()));
 block();
}
origin: io.vertx/vertx-platform

if (valid) {
 for (Diagnostic<?> d : diagnostics.getDiagnostics()) {
  log.info(d);
  log.warn(d);
origin: com.englishtown/vertx-mod-cassandra

@Override
protected void initSeeds(JsonArray seeds) {
  // Recall super
  super.initSeeds(seeds);
  // If default, try env vars
  if (DEFAULT_SEEDS.equals(this.seeds)) {
    String envVarSeeds = container.env().get(ENV_VAR_SEEDS);
    if (!Strings.isNullOrEmpty(envVarSeeds)) {
      logger.debug("Using environment configuration of " + envVarSeeds);
      String[] seedsArray = envVarSeeds.split("\\|");
      this.seeds = ImmutableList.copyOf(seedsArray);
    }
  }
}
origin: org.vert-x/vertx-core

private void checkAndSend(boolean send, final String address, JsonObject jsonObject,
             final SockJSSocket sock,
             final String replyAddress) {
 final Handler<Message<JsonObject>> replyHandler;
 if (replyAddress != null) {
  replyHandler = new Handler<Message<JsonObject>>() {
   public void handle(Message<JsonObject> message) {
    // Note we don't check outbound matches for replies
    // Replies are always let through if the original message
    // was approved
    checkAddAccceptedReplyAddress(message.replyAddress);
    deliverMessage(sock, replyAddress, message);
   }
  };
 } else {
  replyHandler = null;
 }
 if (log.isDebugEnabled()) {
  log.debug("Forwarding message to address " + address + " on event bus");
 }
 if (send) {
  eb.send(address, jsonObject, replyHandler);
 } else {
  eb.publish(address, jsonObject);
 }
}
origin: org.vert-x/vertx-core

/**
 * Create the singleton Hazelcast instance if necessary
 * @return
 */
private synchronized HazelcastInstance initHazelcast() {
 if (instance == null) {
  Config cfg = getConfig(null);
  if (cfg == null) {
   log.warn("Cannot find cluster.xml on classpath. Using default cluster configuration");
  }
  // default instance
  instance = Hazelcast.init(cfg);
  // Properly shutdown all instances
  Runtime.getRuntime().addShutdownHook(new Thread() {
   @Override
   public void run() {
    Hazelcast.shutdownAll();
   }
  });
 }
 return instance;
}
origin: org.vert-x/vertx-platform

 public void handle(HttpClientResponse resp) {
  if (resp.statusCode == 200) {
   log.info("Downloading module...");
   resp.bodyHandler(new Handler<Buffer>() {
    public void handle(Buffer buffer) {
     mod.set(buffer);
     latch.countDown();
    }
   });
  } else if (resp.statusCode == 404) {
   log.error("Can't find module " + moduleName + " in repository");
   latch.countDown();
  } else {
   log.error("Failed to download module: " + resp.statusCode);
   latch.countDown();
  }
 }
});
org.vertx.java.core.loggingLogger

Javadoc

This class allows us to isolate all our logging dependencies in one place. It also allows us to have zero runtime 3rd party logging jar dependencies, since we default to JUL by default.

By default logging will occur using JUL (Java-Util-Logging). The logging configuration file (logging.properties) used by JUL will taken from the default logging.properties in the JDK installation if no java.util.logging.config.file system property is set. The vertx-java / vertx-ruby / etc scripts set java.util.logging.config.file to point at the logging.properties in the vertx distro install directory. This in turn configures vertx to log to a file in a directory called vertx-logs in the users home directory.

If you would prefer to use Log4J or SLF4J instead of JUL then you can set a system property called org.vertx.logger-delegate-factory-class-name to the class name of the delegate for your logging system. For Log4J the value is org.vertx.java.core.logging.Log4JLogDelegateFactory, for SLF4J the value is org.vertx.java.core.logging.SLF4JLogDelegateFactory. You will need to ensure whatever jar files required by your favourite log framework are on your classpath.

Most used methods

  • error
  • info
  • debug
  • warn
  • trace
  • isDebugEnabled
  • <init>
  • isTraceEnabled

Popular in Java

  • Reading from database using SQL prepared statement
  • getSupportFragmentManager (FragmentActivity)
  • onCreateOptionsMenu (Activity)
  • requestLocationUpdates (LocationManager)
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • Reference (javax.naming)
  • JTable (javax.swing)
  • IOUtils (org.apache.commons.io)
    General IO stream manipulation utilities. This class provides static utility methods for input/outpu
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
  • 14 Best Plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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