public static synchronized void setLogLevel(LogLevel logLevel) { if (LOG_LEVEL != logLevel) { info("Changing log level", "from", LOG_LEVEL, "to", logLevel); } LOG_LEVEL = logLevel; }
static synchronized void notifyChanges() { if (!dirty) { dirty = true; Log.info("Detected class or resource changes"); } }
public void connect(ConnectionTarget target) throws IOException { configureSocket(target.socketChannel); connecting.add(target); if (target.socketChannel.connect(target.addr)) { Log.info("Opened socket, connected", "address", target.addr); } else { Log.info("Opened socket, connecting...", "address", target.addr); } selector.wakeup(); }
public static void info(String msg, String key, double value) { if (Log.isInfoEnabled()) { Log.info(msg, key, value); } }
public static void info(String msg, String key1, long value1, String key2, long value2) { if (Log.isInfoEnabled()) { Log.info(msg, key1, value1, key2, value2); } }
public static void info(String msg, String key1, double value1, String key2, boolean value2) { if (Log.isInfoEnabled()) { Log.info(msg, key1, value1, key2, value2); } }
public static void info(String msg, String key, long value) { if (Log.isInfoEnabled()) { Log.info(msg, key, value); } }
public static void info(String msg, String key1, Object value1, String key2, boolean value2) { if (Log.isInfoEnabled()) { Log.info(msg, key1, value1, key2, value2); } }
public static void info(String msg, String key1, long value1, String key2, double value2) { if (Log.isInfoEnabled()) { Log.info(msg, key1, value1, key2, value2); } }
public static void info(String msg, String key1, Object value1, String key2, long value2) { if (Log.isInfoEnabled()) { Log.info(msg, key1, value1, key2, value2); } }
private synchronized void onFileSystemChange(String filename) { mustBeRoot(); if (filename.endsWith(".yaml") || filename.endsWith(".yml") || filename.endsWith(".json")) { Log.info("Detected configuration file changes", "file", filename); reloadAndProcessChanges(); } }
private static void detectCurrentTestMethod() { if (testMethod == null && (!Env.isInitialized() || Env.test())) { testMethod = Msc.getTestMethodIfExists(); if (testMethod != null) { Log.info("Detected test method", "class", testMethod.getDeclaringClass().getSimpleName(), "name", testMethod.getName()); } } }
private static void onAppReady() { status = AppStatus.RUNNING; IoC.ready(); Setups.ready(); Log.info("!Ready."); }
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 synchronized void setProfiles(String... activeProfiles) { if (U.isEmpty(profiles)) { profiles = Coll.synchronizedSet(); profilesView = Collections.unmodifiableSet(profiles); } Collections.addAll(this.profiles, activeProfiles); this.mode = null; initModeAndProfiles(); if (!silent()) Log.info("Activating custom profiles", "!activating", activeProfiles, "!resulting profiles", this.profiles, "!resulting mode", this.mode); }
@Override public synchronized void reset() { if (!state.isEmpty()) { Log.info("Resetting IoC context", "context", this); } else { Log.debug("Resetting IoC context", "context", this); } state.reset(); metadata.clear(); beanProvider = null; activate.reset(); }
synchronized boolean setFilenameBase(String filenameBase) { RapidoidEnv.touch(); if (U.neq(this.filenameBase, filenameBase)) { if (!Msc.isSilent()) { Log.info("Changing configuration filename base", "!from", this.filenameBase, "!to", filenameBase); } this.filenameBase = filenameBase; return true; } return false; }
private synchronized void ensureIsInitialized() { if (!initialized) { validate(); registerJDBCDriver(); if (this.dataSource == null) { this.dataSource = this.usePool ? createPool() : null; } String ds = dataSource != null ? Cls.of(dataSource).getSimpleName() : null; Log.info("Initialized JDBC API", "!url", url, "!driver", driver, "!username", username, "!password", maskedPassword(), "!dataSource", ds); initialized = true; } }
public ReverseProxy addTo(Setup setup) { Log.info("!Reverse proxy mapping", "!uriPrefix", uriPrefix, "!upstreams", upstreams); ReverseProxy proxy = createReverseProxy(); U.must(uriPrefix.startsWith("/"), "The URI prefix must start with '/'"); String path = uriPrefix.equals("/") ? "/*" : uriPrefix + "/*"; OnRoute route = setup.any(path); if (roles != null) route.roles(roles); if (cacheTTL != null) route.cacheTTL(cacheTTL); if (cacheCapacity != null) route.cacheCapacity(cacheCapacity); route.serve(proxy); return proxy; }