WebObjects: Using WebObjects Log Files

This document explains how to read and use WebObjects 4.5.1 and WebObjects 5.0 log files using Solaris, Microsoft Windows NT or Windows 2000, and Mac OS X.
Before you start: In order to access WebObject log files you need to have root or administrator access to the WebObjects application server.

The location of the wotaskd log file varies depending on the computer operating system and version of WebObjects used. The table below lists the location of the wotaskd log file.

Windows 2000 Solaris Mac OS X
WebObjects 4.5.1 Event Viewer /tmp/wotaskd.log /var/log/webobjects.log
WebObjects 5.0 Event Viewer none by default.
See "Creating a wotaskd log file on Solaris running WebObjects 5.0", below for how to specify.
/var/log/webobjects.log

Using tail (Solaris and Mac OS X)

The tail command is used to view the last lines of a file from a terminal window. This is helpful since WebObjects processes add the most recent information into the last lines of the log file. Three options are described in this section, tail, tail -f, and tail -N.

tail

Example: tail webobjects.log

If the tail command is used without any options, it displays the last ten lines of a text file on the computer monitor.

tail -f

Examples: tail -f webobjects.log

Solaris:  tail -f /tmp/wotaskd.log
Mac OS X: tail -f /var/log/webobjects.log

When used with the -f option, tail continues to run and displays all output on the screen. The -f option is very useful when trying to determine when something is happening.

tail -N

Where N is a number of lines.

Examples: tail -50 webobjects.log

Solaris: tail -50 /tmp/wotaskd.log
Mac OS X: tail -50 /var/log/webobjects.log

The example above displays the last 50 lines of the log file on the computer monitor. It might be necessary to use the more command in conjunction with the line number option to ensure all the output is visible on the computer display. The space bar is used to display the next screen of output.

Example of using tail with more: tail -50 webobjects.log | more

Additional information on using the tail command is available in the tail manpage.

Example: man tail

Using the Event Viewer (Microsoft Windows NT and Windows 2000)

The Event Viewer is used on Microsoft Windows NT and Windows 2000 to view log files for running processes. However, the Event Viewer is accessed differently on Windows NT than on Windows 2000.

Microsoft Windows NT


Microsoft Windows 2000
Creating a wotaskd log file on Solaris running WebObjects 5.0

By default, the output of wotaskd is redirected to /dev/null which means the output is not stored. In order to store the output of wotaskd, the output needs to be redirected to a file.


Example:

Before:
 "$WOSERVICE" -appPath "$WOTASKD" -WOPort "$PORT" >/dev/null 2>&1 &
After:
 "$WOSERVICE" -appPath "$WOTASKD" -WOPort "$PORT" >/tmp/wotaskd.log 2>&1 &

Important: You must restart wotaskd in order for this change to take effect.

The commands for stopping and restarting wotaskd on Solaris are:

/etc/rc2.d/S79WOServices stop

/etc/rc2.d/S79WOServices start

Published Date: Oct 10, 2016