Class KLogJDBCHandler
java.lang.Object
java.util.logging.Handler
ch.k43.util.KLogJDBCHandler
Java logging handler to output logging data to any compliant JDBC database. The log data rows are deleted according to the
parameter
retensiondays
during KLogJDBCHandler class instantiation. If the table does not exist during class instantiation,
the table will be created with the following SQL statement:
CREATE TABLE {TableName} (UUID CHAR(36), LOGTIME TIMESTAMP, LEVEL VARCHAR(20), LOCATION VARCHAR(80), TEXT VARCHAR(500))The following properties are supported:
ch.k43.util.KLogJDBCHandler.jdbc.driver = Java class name ch.k43.util.KLogJDBCHandler.jdbc.url = JDBC connection URL, e.g. jdbc:h2:/Users/jsmith/KLogDB ch.k43.util.KLogJDBCHandler.jdbc.username = User name ch.k43.util.KLogJDBCHandler.jdbc.password = Password ch.k43.util.KLogJDBCHandler.tablename = SQL table name (default KLOGDATA) ch.k43.util.KLogJDBCHandler.retensiondays = Number of days before log records are deleted (default 30) ch.k43.util.KLogJDBCHandler.debug = true/false (Output sent to System.out/System.err, default false)
- Since:
- 2024.06.16
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.util.logging.Handler
getEncoding, getErrorManager, getFilter, getFormatter, getLevel, isLoggable, setEncoding, setErrorManager, setFilter, setFormatter, setLevel
-
Constructor Details
-
KLogJDBCHandler
public KLogJDBCHandler()Class constructor.
-
-
Method Details
-
close
-
flush
-
publish
-
toString
-