BACK | INDEX | EXIT | NEXT |
See RequestLog and NCSARequestLog.
Debugging
Debugging information is logged via the collection of
org.mortbay.util.LogSink instances configured into the static
instance of org.mortbay.util.Log
. The static instance can be configured via the API, XML or java system
properties.
For example, to configure a debug log file that will be rolled over
(as indicated by the yyyy_mm_dd suffix indicates this):
java -DDEBUG -DLOG_FILE=./logs/debug_yyyy_mm_dd.log org.mortbay.jetty.ServerExample: Setting the debug log file |
ASSERT | reports the outcome of a programmatic assertion |
WARN | a programmer initiated warning, intended to be viewed by technical staff |
FAIL | a programmer initiated fatal error |
DEBUG | general debug message |
DEBUG | Only if this property is set will any debug output
be produced |
DEBUG_PATTERNS | Can be set to a comma separated list of strings.
In this case, debug output is only produced from those classes whose
fully qualified class name contains one of the strings as a substring.
Eg.
|
DEBUG_OPTIONS | String of one letter options:
|
DEBUG_VERBOSE | An integer value available to the programmer for
deciding level of output verbosity. The Jetty code uses the following verbosity
settings:
|
java -DDEBUG \ -DLOG_FILE=./logs/debug_yyyy_mm_dd.log \ -DDEBUG_VERBOSE=99 -DDEBUG_PATTERNS="SocketListener,ThreadedServer"\ org.mortbay.jetty.ServerExample: Debug system properties |
<Set name="Debug" class="org.mortbay.util.Code" type="boolean">true</Set> <Set name="Verbose" class="org.mortbay.util.Code" type="int">99</Set> <Set name="DebugPatterns" class="org.mortbay.util.Code" type="String">"SocketListener,ThreadedServer"</Set> <Call name="instance" class="org.mortbay.util.Log"> <Call name="disableLog"/> <Call name="add"> <Arg> <New class="org.mortbay.util.WriterLogSink"> <Arg><SystemProperty name="jetty.home" default="."/>/logs/debug_yyyy_mm_dd.log</Arg> <Set name="RetainDays">90</Set> <Set name="Append">true</Set> <Call name="start"/> </New> </Arg> </Call> </Call> |
XML Example: Debug set up |
BACK | INDEX | EXIT | NEXT |