Class JsonLoggerUpdateListener
java.lang.Object
org.kawanfw.sql.api.server.listener.JsonLoggerUpdateListener
- All Implemented Interfaces:
UpdateListener
public class JsonLoggerUpdateListener extends Object implements UpdateListener
Concrete implementation of
UpdateListener. The
updateActionPerformed(ClientEvent, Connection) logs using JSON format
the SqlEvent.- Since:
- 9.0
- Author:
- Nicolas de Pomereu
-
Constructor Summary
Constructors Constructor Description JsonLoggerUpdateListener() -
Method Summary
Modifier and Type Method Description static Map<String,String>getLoggerElements()Returns the Logger elements (for debug purpose)voidupdateActionPerformed(SqlEvent evt, Connection connection)Logs using JSON format theSqlEventand theSqlFirewallManagerclass name into aLoggerwith parameters: Name:JsonLoggerUpdateListenerFile name pattern:user.home/.kawansoft/log/JsonLoggerUpdateListener_%d.log.%i(example of file created:JsonLoggerUpdateListener_2024-07-01.log.1.). Pattern of each line of log:"%msg%n"Maximum File Size: 300Mb Total Size Cap: 30Gb These default values may be superseded by creating aJsonLoggerUpdateListener.propertiesfile inuser.home/.kawansoft/conf.
-
Constructor Details
-
JsonLoggerUpdateListener
public JsonLoggerUpdateListener()
-
-
Method Details
-
updateActionPerformed
public void updateActionPerformed(SqlEvent evt, Connection connection) throws IOException, SQLExceptionLogs using JSON format theSqlEventand theSqlFirewallManagerclass name into aLoggerwith parameters:- Name:
JsonLoggerUpdateListener - File name pattern:
user.home/.kawansoft/log/JsonLoggerUpdateListener_%d.log.%i(example of file created:JsonLoggerUpdateListener_2024-07-01.log.1.). - Pattern of each line of log:
"%msg%n" - Maximum File Size: 300Mb
- Total Size Cap: 30Gb
JsonLoggerUpdateListener.propertiesfile inuser.home/.kawansoft/conf.
See the JsonLoggerUpdateListener.properties format.
- Specified by:
updateActionPerformedin interfaceUpdateListener- Parameters:
evt- the SQL update event that is successfully processedconnection- the Connection in use for the SQL update event- Throws:
IOException- if an IOException occursSQLException- if a SQLException occurs
- Name:
-
getLoggerElements
Returns the Logger elements (for debug purpose)- Returns:
- the lOGGER_ELEMENTS
-