All Packages Class Hierarchy This Package Previous Next Index
com.imaginary.sql.msql.MsqlLog
MsqlLog object that supports the
logging of certain kinds of events as specified at runtime by
either system properties or connection properties. You can associate
logging with either the whole application or a specific connection.
If you specify both, the connection properties will override
the system properties for that connection only.
The system properties have the same names as the connection level properties, except they are preceeded by "imaginary.msql-jdbc.". So, if you want to log regular errors and fatal errors, you would pass:
-Dimaginary.msql-jdbc.logging=FATAL,ERRORIf you want to set that logging just for a specific connection, then do the following in your connection code:
Properties p = new Properties();
// set all the things like user name and password the driver requires
p.setProperty("logging", "FATAL,ERROR");
The different kinds of levels are:
public static final int NONE
public static final int FATAL
public static final int JDBC
public static final int MSQL
public static final int ERROR
public static final int DRIVER
public static final int METHODS
public static final int THREADS
public static final int ALL
public MsqlLog(int lvl,
Object own)
public void close()
public int getLevel()
public void log(String method,
int type,
String event)
All Packages Class Hierarchy This Package Previous Next Index