APISonar


com.palantir.atlasdb.logging.KvsProfilingLogger.LoggingFunction.log

> com > palantir > atlasdb > logging > KvsProfilingLogger > LoggingFunction > log
com APIs palantir APIs atlasdb APIs logging APIs KvsProfilingLogger APIs LoggingFunction APIs log APIs

Example 1
public void logSlowResult(KvsProfilingLogger.LoggingFunction log, Stopwatch timer) {
        Object[] allArgs = new Object[args().size() + 3];
        allArgs[0] = SafeArg.of("queryFormat", safeQueryFormat());
        allArgs[1] = UnsafeArg.of("fullQuery", toString());
        allArgs[2] = LoggingArgs.durationMillis(timer);
        System.arraycopy(args().toArray(), 0, allArgs, 3, args().size());

        log.log("A CQL query was slow: queryFormat = [{}], fullQuery = [{}], durationMillis = {}", allArgs);
    }