Documentation Archive Developer
Search
PATH  Documentation > WebObjects 4.5 > Deploying WebObjects Applications

   

Logging and Analyzing Adaptor Activity

If an adaptor sees that a file named logWebObjects exists in the temporary directory, it will log its activity in WebObjects.log in that same directory. Logging adaptor activity significantly decreases performance. Use this feature only if you suspect something is wrong; do not use it during deployment.

The temporary directory depends on the platform:

You can analyze the information in the log to find out such things as which applications are being requested, which applications are being autostarted, and what the HTTP headers of requests are. You can also use the log to verify if adaptors are properly configured for load balancing.

The following excerpt includes an error message indicating that ThinkMovies wasn't running when a request for it came in:

Info: <CGI> new request: /cgi-bin/WebObjects/ThinkMovies
Info: V4 URL: /cgi-bin/WebObjects/ThinkMovies

Error: Request handling error: The requested application was not found on this server

After ThinkMovies was started, the same request produces the following log file entries:

Info: <CGI> new request: /cgi-bin/WebObjects/ThinkMovies
Info: V4 URL: /cgi-bin/WebObjects/ThinkMovies
Info: Selecting new app instance
Debug: Composed URL to `/cgi-bin/WebObjects/ThinkMovies.woa/1'
Info: New request is GET /cgi-bin/WebObjects/ThinkMovies.woa/1 HTTP/1.0
 

Info: Trying to contact ThinkMovies:1 on (2001)
Info: attempting to connect to myhost.apple.com on port 2001
Info: Created new transient connection to myhost.apple.com:2001
Info: ThinkMovies:1 on (2001) connected [pooled: No]
Info: Request GET /cgi-bin/WebObjects/ThinkMovies.woa/1 HTTP/1.0 sent, awaiting response [1 pending]
Info: New response: HTTP/1.0 200 Apple WebObjects
Info: received ->200 Apple

Creating the Log File

To cause the log file to be generated, simply create the logWebObjects file in your server's temp directory. The following procedure shows you how to do this:

  1. Start a command shell window (on NT use the Bourne Shell in the WebObjects program group).
  2. Change to the temporary directory (using the cd command).
  3. Enter the following command to create the logWebObjects file:
  4. touch logWebObjects
On UNIX-based systems, you must have root privileges.

Use the tail command to print the current activity in the adaptor to standard output (the shell window):

tail -f WebObjects.log
© 1999 Apple Computer, Inc. – (Last Updated 25 August 99)