background image
<< derby.stream.error.logBootTrace | derby.system.bootAll >>

derby.stream.error.method

<< derby.stream.error.logBootTrace | derby.system.bootAll >>
Derby Reference Manual
381
Specifies which errors are logged to the Derby error log (typically the derby.log file).
In test environments, use the setting derby.stream.error.logSeverityLevel=0 so that all
problems are reported.
Any error raised in a Derby system is given a level of severity. This property indicates
the minimum severity necessary for an error to appear in the error log. The severities are
defined in the class org.apache.derby.types.ExceptionSeverity. The higher the number,
the more severe the error.
· 20000
Errors that cause the statement to be rolled back, for example syntax errors and
constraint violations.
· 30000
Errors that cause the transaction to be rolled back, for example deadlocks.
· 40000
Errors that cause the connection to be closed.
· 50000
Errors that shut down the Derby system.
Default
40000.
Example
// send errors of level 30000 and higher to the log
derby.stream.error.logSeverityLevel=30000
Dynamic or static
This property is static; if you change it while Derby is running, the change does not take
effect until you reboot.
derby.stream.error.method
Function
Specifies a static method that returns a stream to which the Derby error log is written.
Specify the method using the fully qualified name of the class, then a dot (.) and then
the method name. The method must be public and static. Its return type can be either
java.io.OutputStream or java.io.Writer. Derby will not call the close() method of the object
returned by the method.
The method is called once at Derby boot time, and the return value is used for the lifetime
of Derby. If the method returns null, the error stream defaults to the system error stream.
If the method does not exist or is inaccessible, the error stream defaults to the system
error stream (java.lang.System.err).
If the value of this property is set, the property derby.stream.error.field is ignored.
If you specify this property, the property setting appears in the error log.
Default
Not set.
Example
derby.stream.error.method=java.sql.DriverManager.getLogStream
Scope