public final class SQLStatementLoggerConfiguration
extends java.lang.Object
SQLStatementLogger.| Modifier and Type | Class and Description |
|---|---|
static class |
SQLStatementLoggerConfiguration.LoggingType
Enum denoting what should happen with a statement: should it just be executed or the intention is to
log things about it?
|
| Modifier and Type | Field and Description |
|---|---|
private boolean |
ALLOW_SENSITIVE
Flag that marks whether potential sensitive data is allowed to be logged.
|
private static java.util.Map<java.lang.String,SQLStatementLoggerConfiguration> |
configs
Map that includes a configuration for each given database.
|
private SQLLoggingDatabaseHelper |
dbHelper
The helper object to facilitate logging to H2 database
|
private static CentralLoggerFile |
fileLogger
The file logger, responsible for writing logs to files.
|
private static java.lang.String |
GLOBAL_DIR_PATH
Global directory path, used if a local one does not exist.
|
private boolean |
IGNORE_META_LOGGING
Flag for ignoring the SQL queries that belong to the
meta database. |
private static CentralLogger |
LOG
Logger.
|
private static java.util.logging.Formatter |
LOG_FORMATTER
The log formatter.
|
private SQLStatementLoggerConfiguration.LoggingType |
loggingType
The type of logging intended.
|
private double |
MIN_TIME_THRESHOLD
Flag for a minimum time threshold.
|
private java.lang.String |
OUTPUT_DB
The file name for the h2 database that will receive the logging output .
|
private java.lang.String |
OUTPUT_FILE
The file that will receive the logging output.
|
private java.lang.String |
PASS_DB
The password for the h2 database that will receive the logging output .
|
private boolean |
STACK_TRACING
Is stack tracing of SQL queries intended? If
LOGGING_ENABLED is false, then this
flag won't matter. |
private java.lang.String |
USER_DB
The user for the h2 database that will receive the logging output .
|
| Modifier | Constructor and Description |
|---|---|
private |
SQLStatementLoggerConfiguration(java.lang.String databaseName)
Constructor of a configuration.
|
| Modifier and Type | Method and Description |
|---|---|
static SQLStatementLoggerConfiguration |
getConfiguration(java.lang.String databaseName)
Get the logging configuration of a specific database.
|
SQLLoggingDatabaseHelper |
getDbHelper()
Getter for the
dbHelper field. |
CentralLoggerFile |
getFileLogger()
Getter for the
fileLogger field. |
SQLStatementLoggerConfiguration.LoggingType |
getLoggingType()
Getter for the
loggingType field. |
double |
getMinTimeThreshold()
Getter for the
MIN_TIME_THRESHOLD field. |
boolean |
isAllowSensitive()
Getter for the
ALLOW_SENSITIVE field. |
boolean |
isIgnoreMetaLogging()
Getter for the
IGNORE_META_LOGGING field. |
boolean |
isStackTracingEnabled()
Getter for the
STACK_TRACING field. |
private static final java.util.Map<java.lang.String,SQLStatementLoggerConfiguration> configs
private static final CentralLogger LOG
private static final java.util.logging.Formatter LOG_FORMATTER
private static final java.lang.String GLOBAL_DIR_PATH
private final SQLStatementLoggerConfiguration.LoggingType loggingType
private static CentralLoggerFile fileLogger
private final boolean STACK_TRACING
LOGGING_ENABLED is false, then this
flag won't matter.private final double MIN_TIME_THRESHOLD
0.0 milliseconds.private final boolean IGNORE_META_LOGGING
meta database.private final boolean ALLOW_SENSITIVE
private final java.lang.String OUTPUT_FILE
private final java.lang.String OUTPUT_DB
private final java.lang.String USER_DB
private final java.lang.String PASS_DB
private volatile SQLLoggingDatabaseHelper dbHelper
private SQLStatementLoggerConfiguration(java.lang.String databaseName)
FileHandler.databaseName - The name of the database in use.public static SQLStatementLoggerConfiguration getConfiguration(java.lang.String databaseName)
databaseName - The name of the database in use.public SQLStatementLoggerConfiguration.LoggingType getLoggingType()
loggingType field.public boolean isStackTracingEnabled()
STACK_TRACING field.STACK_TRACING.public boolean isIgnoreMetaLogging()
IGNORE_META_LOGGING field.IGNORE_META_LOGGING.public boolean isAllowSensitive()
ALLOW_SENSITIVE field.ALLOW_SENSITIVE.public double getMinTimeThreshold()
MIN_TIME_THRESHOLD field.MIN_TIME_THRESHOLD.public SQLLoggingDatabaseHelper getDbHelper()
dbHelper field.dbHelper.public CentralLoggerFile getFileLogger()
fileLogger field.fileLogger.