Package com.codahale.metrics.jdbi3
Class InstrumentedSqlLogger
- java.lang.Object
-
- com.codahale.metrics.jdbi3.InstrumentedSqlLogger
-
- All Implemented Interfaces:
org.jdbi.v3.core.statement.SqlLogger
public class InstrumentedSqlLogger extends Object implements org.jdbi.v3.core.statement.SqlLogger
ASqlLogger
implementation for JDBI which uses the SQL objects' class names and method names for nanosecond-precision timers.
-
-
Constructor Summary
Constructors Constructor Description InstrumentedSqlLogger(MetricRegistry registry)
InstrumentedSqlLogger(MetricRegistry registry, StatementNameStrategy statementNameStrategy)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
logAfterExecution(org.jdbi.v3.core.statement.StatementContext context)
void
logException(org.jdbi.v3.core.statement.StatementContext context, SQLException ex)
-
-
-
Constructor Detail
-
InstrumentedSqlLogger
public InstrumentedSqlLogger(MetricRegistry registry)
-
InstrumentedSqlLogger
public InstrumentedSqlLogger(MetricRegistry registry, StatementNameStrategy statementNameStrategy)
-
-
Method Detail
-
logAfterExecution
public void logAfterExecution(org.jdbi.v3.core.statement.StatementContext context)
- Specified by:
logAfterExecution
in interfaceorg.jdbi.v3.core.statement.SqlLogger
-
logException
public void logException(org.jdbi.v3.core.statement.StatementContext context, SQLException ex)
- Specified by:
logException
in interfaceorg.jdbi.v3.core.statement.SqlLogger
-
-