public void infoOrDebug()

in src/main/java/org/apache/sling/discovery/commons/providers/util/LogSilencer.java [58:80]


    public void infoOrDebug(String category, String msg) {
        final boolean doLogInfo;
        synchronized (syncObj) {
            if (autoResetTime == 0 || System.currentTimeMillis() > autoResetTime) {
                reset();
            }
            if (lastMsgPerCategory == null) {
                lastMsgPerCategory = new HashMap<>();
            }
            final String localLastMsg = lastMsgPerCategory.get(category);
            if (localLastMsg == null || !localLastMsg.equals(msg)) {
                doLogInfo = true;
                lastMsgPerCategory.put(category, msg);
            } else {
                doLogInfo = false;
            }
        }
        if (doLogInfo) {
            logger.info("{} {}", msg, "(future identical logs go to debug)");
        } else {
            logger.debug(msg);
        }
    }