Generating Webstats

Overview

When configured properly, BearShare can generate CLF (Common Log Format) compatible log files for all upload activity. BearShare comes bundled with a command line version of the Webalizer, a freeware utility that processes generated log files and turns them into attractive HTML reports.

Activate Logging

BearShare will only create and add entries to the log file if a directory called "Logs" exists in the same directory as the BearShare executable (BearShare.exe).

The first step to generate Webstats is to create this directory called "Logs" in the same place that you installed BearShare.

This can be done while the program is running. After you have created the directory, a text file called "access.txt" will be generated. Each line in this file is a logged upload request. Upload requests are logged whether they are successful or not, with the appropriate HTTP Status code being recorded.

Note: The FreePeers Agent does not produce a log entry until the connection associated with the upload is closed.

Generate Reports

When launched, the Webstats.exe program processes the data in the log file and produces HTML output in a directory called "Webstats" located in the same place as your "Logs" directory. Inside this directory is the table of contents for the HTML reports called "index.html". Open this file from the Explorer to view your logs.

The configuration file "Webstats.ini" controls the creation of the report and governs its settings. See below for references on documentation about this file.

The default settings for Webstats.ini activate incremental mode report generation. Each time you run the Webstats.exe program, it updates the reports to only include the new information in the log file.

Cleaning Logs

Since the log file only grows, it is necessary to periodically delete the log file. To prevent data loss, only delete the log file after you have exited BearShare and run the Webstats.exe program to update your reports.

Credits

The Webalizer software package is written by Brad Barret and distributed under the GNU General Public License. The original source code and binary distribution can be found at the Webalizer Home Page. The version bundled with BearShare is identical to the Webalizer for Windows ported by Klaus Mueller with the exception that the ZLib compression library is statically linked into the Webalizer executable, and some cosmetic changes were made to the HTML output.

The Webalizer package uses the PNG Portable Network Graphic file format to produce the images, and is therefore free of the patent problems associated with the Compuserve GIF format.

The Webalizer package uses the following libraries: