void (@NotNull String recorderId, Exception e) { final String message = String.format(Locale.ENGLISH, "%s: %s", e.getClass().getName(), Objects.requireNonNullElse(e.getMessage(), "No message provided")); if (e instanceof ConnectException || e instanceof HttpTimeoutException || e instanceof SSLHandshakeException || e instanceof StatsResponseException) { // Expected non-critical problems: no connection, bad connection, errors on loading data myApplicationInfo.getLogger().info(message); } else { myApplicationInfo.getLogger().warn(message, e); } myApplicationInfo.getEventLogger().logErrorEvent(recorderId, "loading.config.failed", e); }