![]() ![]() ![]() ![]() |
Table of Contents |
The VolanoChat server uses the text formatting capabilities of Java to allow you to define your own formats for the text, numbers, dates and times in all of the server log files. This section explains how to modify the formats of the following server log files by editing the associated strings in the properties.txt file:
The format of the status application output can be configured by modifying its Java message format patterns.
format.date
format.status.memory
format.status
format.date
pattern above,format.status.memory
pattern above,format.status.resources
pattern below,format.status.resources
Applet 1: Status report format worksheet.
The server access log is formatted from the following message patterns:
format.date
format.access.agent
format.access.extra
"-"
if this connection was not kicked or banned.format.access
format.date
pattern above,format.access.agent
pattern above, andformat.access.extra
pattern above.The default access format pattern is assembled as shown below. This format is the NCSA Extended Common Log Format that can be analyzed by any Web log statistical program, such as Analog and Web Trends.
{0} - - {1} "GET {2} HTTP/{3}" {4,number,0} {5,number,0} "{6}" "{7}" {8} ^ ^ ^ | | | format.date format.access.agent | format.access.extra
The applet worksheet below lets you try out different access log format patterns right on this Web page. The patterns are filled with sample data to give you an idea what a corresponding log entry will look like. Just modify the format fields and press the Enter key.
For example, remove the "z"
from the format.date
pattern and press the Enter key. You'll see the time zone removed from the formatted date. Change the "MMM"
in the date to "mm"
and you'll see the date's abbreviated month changed into the month's numeric representation. For a shorter time stamp, try "M/d/y hh:mm:ss a"
. The other patterns may be modified in a similar fashion.
Applet 2: Server access log format worksheet.
See the section at the end of this page for information about all the possible date, time, and number formatting symbols.
All potential errors are written to the file defined by the log.error
server property. The format of each error is determined by the value of the server.verbose
property, which can be set to either true or false. By default server.verbose is set to false. With the verbose error logging disabled, errors are written one per line with a time stamp as a prefix, shown on two lines below:
[Sun May 03 11:45:22 PDT 1998] Error reading from 192.168.0.2. (java.net.SocketException: Connection reset by peer)
With the verbose error logging enabled, each error message is followed by the Java stack trace showing where the error originated in the VolanoChat server or Java virtual machine, as shown below:
[Sun May 03 11:45:57 PDT 1998] Error reading from 192.168.0.2. java.net.SocketException: Connection reset by peer at java.net.SocketInputStream.read(Compiled Code) at java.io.BufferedInputStream.fill(Compiled Code) at java.io.BufferedInputStream.read(Compiled Code) at java.io.DataInputStream.readUnsignedShort(Compiled Code) at java.io.DataInputStream.readUTF(Compiled Code) at COM.volano.net.Connection.read(Compiled Code) at COM.volano.net.Connection.run(Compiled Code) at java.lang.Thread.run(Compiled Code)
The public room access log is formatted from the following message patterns:
format.date
format.public
format.date
pattern above,The applet worksheet below lets you try out different public room access format patterns right on this Web page.
Applet 3: Public room access log format worksheet.
The private room access log is formatted from the following message patterns:
format.date
format.private
format.date
pattern above,The applet worksheet below lets you try out different private room access format patterns right on this Web page.
Applet 4: Private room access log format worksheet.
The format of each banned log entry is defined by the following Java format string. The default string below is defined for easy import into the host access control files.
format.banned={1}\={2,choice,0\#Static|1\#Dynamic|2\#Netblock} \ address banned at {0} as {4} in {3} by {5}
Where:
The format of this file is determined by Tomcat. More information can be found at Apache's Tomcat logging page.
The Tomcat servlet runner uses the Common Log Format. A definition of the Common Log Format can be found in Apache's Log Files page.
The Velocity engine is not implemented in this version of VolanoChat, and it's logfile is not written to.
The support.log file is generated once each time the chat server is started, and cannot be reformatted.
Further information about message formatting patterns can be found in the Internationalization Tutorial chapter of the The Java Tutorial. For a complete list of all the date and time formatting symbols you can use, see the tables under Time Format Syntax and Examples Using the US Locale in the java.text.SimpleDateFormat Java class definition.
![]() ![]() ![]() ![]() |
XHTML 1.0 | Table of Contents |