Class DatabaseHandler
java.lang.Object
com.sk89q.worldguard.blacklist.logger.DatabaseHandler
- All Implemented Interfaces:
LoggerHandler
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Close the logger.void
logEvent
(BlacklistEvent event, String comment) Log an event.
-
Constructor Details
-
DatabaseHandler
public DatabaseHandler(String dsn, String user, String pass, String table, String worldName, Logger logger) Construct the object.- Parameters:
dsn
- The DSN for the connectionuser
- The username to connect withpass
- The password to connect withtable
- The table to log toworldName
- The name of the world to loglogger
- The logger to log errors to
-
-
Method Details
-
logEvent
Description copied from interface:LoggerHandler
Log an event.- Specified by:
logEvent
in interfaceLoggerHandler
- Parameters:
event
- The eventcomment
- The comment to log with the event
-
close
public void close()Description copied from interface:LoggerHandler
Close the logger.- Specified by:
close
in interfaceLoggerHandler
-