public static void warn(String msg, String key, long value) { if (Log.isWarnEnabled()) { Log.warn(msg, key, value); } }
public static void warn(String msg, String key, double value) { if (Log.isWarnEnabled()) { Log.warn(msg, key, value); } }
public static void warn(String msg, String key1, long value1, String key2, double value2) { if (Log.isWarnEnabled()) { Log.warn(msg, key1, value1, key2, value2); } }
public static void warn(String msg, String key1, Object value1, String key2, boolean value2) { if (Log.isWarnEnabled()) { Log.warn(msg, key1, value1, key2, value2); } }
public static void warn(String msg, String key1, long value1, String key2, boolean value2) { if (Log.isWarnEnabled()) { Log.warn(msg, key1, value1, key2, value2); } }
public OpenAPIDescriptor(Setup setup, Config cfg) { this.setup = setup; this.cfg = cfg; if (cfg.isEmpty()) { Log.warn("OpenAPI is not configured, will use the defaults!"); } }
public static void warn(String msg, String key1, Object value1, String key2, double value2) { if (Log.isWarnEnabled()) { Log.warn(msg, key1, value1, key2, value2); } }
public static void warn(String msg, String key1, double value1, String key2, double value2) { if (Log.isWarnEnabled()) { Log.warn(msg, key1, value1, key2, value2); } }
public static void warn(String msg, String key1, boolean value1, String key2, boolean value2) { if (Log.isWarnEnabled()) { Log.warn(msg, key1, value1, key2, value2); } }
public static void warn(String msg, String key, boolean value) { if (Log.isWarnEnabled()) { Log.warn(msg, key, value); } }
private void init(Path dir) { Log.debug("Registering directory watch", "dir", dir); try { WatchKey key = dir.register(watchService, ENTRY_CREATE, ENTRY_DELETE, ENTRY_MODIFY); U.notNull(key, "watch key"); keys.put(key, dir); } catch (IOException e) { Log.warn("Couldn't register to watch for changes", "dir", dir); } }
public static void terminate(final int afterSeconds) { Log.warn("Terminating application in " + afterSeconds + " seconds..."); new Thread(() -> { U.sleep(afterSeconds * 1000); terminate(); }).start(); }
private void retryConnecting(ConnectionTarget target) throws IOException { Log.warn("Reconnecting...", "address", target.addr); target.socketChannel = SocketChannel.open(); target.retryAfter = U.time() + 1000; connect(target); }
public synchronized void closeInbound() { try { engine.closeInbound(); } catch (SSLException e) { Log.warn("SSL error while closing connection", "message", Msc.errorMsg(e)); } }
private int doTryToExecute(String sql, Map<String, ?> namedArgs, Object[] args) { try { return doExecute(sql, namedArgs, args); } catch (Exception e) { // ignore the exception Log.warn("Ignoring JDBC error", "error", Msc.errorMsg(e)); } return 0; }
public static RootContext from(String root) { if (root != null) { File dir = new File(root); if (dir.exists()) { int count = getAppResourcesCount(dir); Log.info("Setting root path", "!root", root, "items", count); } else { Log.warn("Setting non-existing root path", "!root", root); } } return new RootContext(root); }
public static void execute(Runnable job) { Opt<ThreadPoolExecutor> executor = jobs.executor(); if (executor.exists()) { ContextPreservingJobWrapper jobWrapper = wrap(job); try { executor.get().execute(jobWrapper); } catch (RejectedExecutionException e) { Log.warn("Job execution was rejected!", "job", job); } } }
public static void executeInContext(WithContext context, Runnable action) { Opt<ThreadPoolExecutor> executor = jobs.executor(); if (executor.exists()) { try { executor.get().execute(new PredefinedContextJobWrapper(context, action)); } catch (RejectedExecutionException e) { Log.warn("The job was rejected by the executor/scheduler!", "context", context.tag()); } } }
public static void bootstrap(String[] packages, DataSource dataSource, Class<?>... providedEntities) { if (MscOpts.hasHibernate()) { if (emf() == null) { bootstrapJPA(packages, dataSource, providedEntities); } else { Log.info("JPA has already been bootstrapped"); } } else { Log.warn("Couldn't find Hibernate, cannot bootstrap JPA!"); } }