Documentation Archive Developer
Search
PATH  Documentation > WebObjects 4.5 > WebObjects Developer's Guide


Table of Contents Previous Section

Maintaining a Log File

WOStatisticsStore has the ability to record session information to a log file that can be analyzed by a Common Log File Format (CLFF) standard analysis tool. WOStatisticsStore does not maintain this log file by default. To store information in a log file, you must set the path to the log file early in your application. For example:

// Java
public Application() {
super();
this.statisticsStore().setLogFile("/tmp/WebObjects.log", 1);
...
}
When a log file is set, WOStatisticsStore records all information returned by descriptionForResponse:inContext: to that log file at the end of each cycle of the request-response loop. Note that descriptionForResponse:inContext: is only invoked during component actions; thus, the log file won't contain entries for direct actions.

Note that descriptions are not saved in the log file in sequential order. A session accumulates descriptions as a user traverses from page to page, and then saves them all at once in the CLFF log file when the session times out. Thus, the WebObjects CLFF log file has a big advantage over a typical HTTP CLFF log file (which saves accesses sequentially): by inspecting it you can clearly see the paths followed by each individual user in your WOApplication. Of course, the WebObjects log file can still be parsed by any web server analysis tool.

Table of Contents Next Section