Package com.pyranid
Class DefaultStatementLogger
java.lang.Object
com.pyranid.DefaultStatementLogger
- All Implemented Interfaces:
StatementLogger
Basic implementation of
StatementLogger
which logs via java.util.logging.- Since:
- 1.0.0
- Author:
- Mark Allen
-
Field Summary
-
Constructor Summary
ConstructorDescriptionCreates a new statement logger with the default logger name"com.pyranid.SQL"
and level.DefaultStatementLogger
(String loggerName, Level loggerLevel) Creates a new statement logger with the given logger name and level. -
Method Summary
Modifier and TypeMethodDescriptionvoid
log
(StatementLog statementLog) Performs a logging operation on the givenstatementLog
.
-
Field Details
-
DEFAULT_LOGGER_NAME
- See Also:
-
DEFAULT_LOGGER_LEVEL
-
-
Constructor Details
-
DefaultStatementLogger
public DefaultStatementLogger()Creates a new statement logger with the default logger name"com.pyranid.SQL"
and level. -
DefaultStatementLogger
Creates a new statement logger with the given logger name and level.- Parameters:
loggerName
- the logger name to useloggerLevel
- the logger level to use
-
-
Method Details
-
log
Description copied from interface:StatementLogger
Performs a logging operation on the givenstatementLog
.Implementors might choose to no-op, write to stdout or a logging framework, send alerts about slow queries, and so on.
- Specified by:
log
in interfaceStatementLogger
- Parameters:
statementLog
- The event to log
-