background image
<< Network Server handling connections | Derby Network Server sample programs >>

Controlling logging by using the log file

<< Network Server handling connections | Derby Network Server sample programs >>
Derby Server and Administration Guide
52
· To change the time that a thread should work on one session's request and check if
there are waiting sessions, use the following command:
java org.apache.derby.drda.NetworkServerControl
timeslice <milliseconds> [-h <hostname>] [-p <portnumber>]
You can also use the derby.drda.timeSlice property to set this value. A value of
0 milliseconds indicates that the thread will not give up working on the session
until the session ends. A value of -1 milliseconds indicates to use the default. The
default value is 0. The maximum number of milliseconds that can be specified is
2147483647 (the maximum size of an integer).
Controlling logging by using the log file
The Network Server uses the
derby.log
file to log problems that it encounters. It also
logs connections when the property
derby.drda.logConnections
is set to
true
.
The
derby.log
file is created when the Derby server is started. The Network Server
then records the time and version. If a log file exists, it is overwritten, unless the property
derby.infolog.append
is set to
true
.
When the Network Server is logging connections, it also logs the Connection Number;
this log message is written both to the
derby.log
file and to the Network Server
console.
· To turn on connection logging, you can use the servlet interface or you can issue
the following command:
java org.apache.derby.drda.NetworkServerControl
logconnections on [-h <hostname>] [-p <portnumber>]
· To turn connection logging off you can use the servlet interface or you can issue the
following command:
java org.apache.derby.drda.NetworkServerControl
logconnections off [-h <hostname>][-p <portnumber>]
See the Derby Developer's Guide for more information about the
derby.log
file.
Controlling tracing by using the trace facility
Use the trace facility only if you are working with technical support and they require
tracing information.
See
Managing the Derby Network Server remotely by using the servlet interface
for
information about managing the trace facility using the servlet interface.
Turning on the trace facility
1. Turn on tracing for all sessions by specifying the following property:
derby.drda.traceAll=true
Alternatively, while the Network Server is running, you can use the following
command to turn on the trace facility:
java org.apache.derby.drda.NetworkServerControl
trace on [-s <connection number>] [-h <hostname>][-p
<portnumber>]
If you specify a <connection number>, tracing will be turned on only for that
connection.
2. Set the location of the tracing files by specifying the following property:
derby.drda.traceDirectory=<directory for tracing files>