public static void logElapsed(int connectionId, long timeElapsedNanos, Category category, Loggable loggable) { // usually an expensive operation => cache where possible String sql = loggable.getSql(); String url = loggable.getConnectionInformation().getUrl(); if (logger != null && meetsThresholdRequirement(timeElapsedNanos) && isCategoryOk(category) && isLoggable(sql)) { doLogElapsed(connectionId, timeElapsedNanos, category, sql, loggable.getSqlWithValues(), url == null ? "" : url); } else if (isDebugEnabled()) { sql = loggable.getSqlWithValues(); debug("P6Spy intentionally did not log category: " + category + ", statement: " + sql + " Reason: logger=" + logger + ", isLoggable=" + isLoggable(sql) + ", isCategoryOk=" + isCategoryOk(category) + ", meetsTreshold=" + meetsThresholdRequirement(timeElapsedNanos)); } }
public static void log(Category category, Loggable loggable) { if (logger != null && isCategoryOk(category) && isLoggable(loggable.getSql())) { doLog(-1, category, loggable.getSql(), loggable.getSqlWithValues()); } }
protected void logElapsed(Loggable loggable, long timeElapsedNanos, Category category, SQLException e) { P6LogQuery.logElapsed(loggable.getConnectionInformation().getConnectionId(), timeElapsedNanos, category, loggable); } }
public static void log(Category category, Loggable loggable) { if (logger != null && isCategoryOk(category) && isLoggable(loggable.getSql())) { doLog(-1, category, loggable.getSql(), loggable.getSqlWithValues()); } }
protected void logElapsed(Loggable loggable, long timeElapsedNanos, Category category, SQLException e) { P6LogQuery.logElapsed(loggable.getConnectionInformation().getConnectionId(), timeElapsedNanos, category, loggable); } }
public static void logElapsed(int connectionId, long timeElapsedNanos, Category category, Loggable loggable) { // usually an expensive operation => cache where possible String sql = loggable.getSql(); String url = loggable.getConnectionInformation().getUrl(); if (logger != null && meetsThresholdRequirement(timeElapsedNanos) && isCategoryOk(category) && isLoggable(sql)) { doLogElapsed(connectionId, timeElapsedNanos, category, sql, loggable.getSqlWithValues(), url == null ? "" : url); } else if (isDebugEnabled()) { sql = loggable.getSqlWithValues(); debug("P6Spy intentionally did not log category: " + category + ", statement: " + sql + " Reason: logger=" + logger + ", isLoggable=" + isLoggable(sql) + ", isCategoryOk=" + isCategoryOk(category) + ", meetsTreshold=" + meetsThresholdRequirement(timeElapsedNanos)); } }