Log2Stats Documentation

Setting up the workspace

This tutorial contains information about web log analysis workspaces in Log2Stats.


Log2Stats workspace is a file which describe log analysis configuration for a single web site. This file has .l2s extension and contains utf-8 encoded XML document. You can clone workspaces by copying this file. Also you can automate creation of new workspaces by writing workspace files by yourself.

Creating a new workspace

To create a new workspace select "Workspace -> New" from the menu or push the "New..." button in the "Workspace management" window. You will see a "Create new workspace" window:

Log2Stats new workspace window

Enter a meaningful title for your workspace into the "Title" field. This field is important since your new workspace file will be created in the directory with the same name as your workspace title. Generally your domain name (mysite.com) or short site description (My first web site) will work.

Path to workspace determines where your workspace will be created. Database, imported log files and cached reports are kept near the workspace file, therefore you should create your workspaces on a drive with a lot of free space.

Domain name field must be filled with exact domain name of your web site without the "www" prefix. It is important to have this field filled properly because Log2Stats uses it to distinguish external referrers from the local ones.

Default file name field must contain the name of the default index file. Almost all Web servers have a default file, usually index.php, default.asp or index.htm, but sometimes default.html, welcome.html, or other, that will be loaded automatically when a directory name is used as the URL. It is important to have this field filled properly so Log2Stats will count requests for directories and index files as requests to the same file.

Push "Create" button to save your workspace. Now you can make changes to additional workspace settings by selecting "Workspace -> Workspace settings" command from the menu.

More workspace settings

If you need to setup additional options, open the "Workspace settings" window from the "Workspace" menu:

Log2Stats workspace settings - General settings

Workspace and Web site settings are the same as in the new workspace creation window.

In the Parsing settings Session timeout or Visit timeout is the maximum number of minutes between the two subsequent hits from the same IP address until they will be recorded as different visits. New visit will be recorded if the request is made after the specified number of minutes of inactivity.
Default value is 30 minutes.

Use advanced visit detection option matches class B (255.255.*.*) networks of visitors instead of IP addresses. This can help to track visits with dynamic IP addresses.

Log files location is used by Log2Stats for storing log files. The program imports log files into this directory. It also reads log files from this directory during parsing process.
Default value is "logs" - directory with this name will be created near your workspace file.
You can also set this to any directory on your computer by specifying the full path, however be prepared that the program will attempt to process every file in this directory, not only log files. Also Log2Stats can make changes to the log files by sorting them and remove duplicates, so it is recommended to leave this settings as is and import log files using the log management window or by copying new log files into this directory manually.

Log files compression option specifies the compression used for imported log files. Log files are compressed only during the import process, no changes will be made to already imported log files. BZIP2 is slow but offers the best compression ratio, GZIP is fast and provides good compression, Uncompressed is not recommended because of large amount of space used on your hard drive.

Reporting settings

Next tab allows you to modify reporting settings:

Log2Stats workspace settings - Reporting settings

Currently there is only one option available: "automatically refresh reports". This option is responsible for automatic regeneration of report after any changes in its settings. It would be wise to turn this option off if you have a lot of visits. In this case you will have to refresh reports manually using the "Refresh" button on the toolbar.

File types settings

File types settings allows you to configure resources on your web site:

Log2Stats workspace settings - File types

Log2Stats allows you to track three types of files: web pages, downloads and images. Also there are four types of logging for resources: log as visit, log as non-visit, don't log and skip entry. In general, every resource, which can be viewed or downloaded only on your web site should be logged as visit: pages, downloadable files and some images falls into this category. Other resources should be logged as non-visit unless you don't want to log sessions for them. You can also completely skip all requests to specific resources and you will not see them in reports at all.

Visit the following manual page if you need more information about file types:  Manual - File types

Parsing filters settings

Parsing filters allows you to modify log file entries before they will be processed and saved into the database:

Log2Stats workspace settings - Parsing filters

You can use parsing filters to accomplish the following tasks:

  • Setup advertizing
  • Append query string variables to resource name
  • Modify resource type and logging strategy
  • Modify requested resource name and query string
  • Change referring domain or referrer string
  • Change user agent and authenticated user fields
  • Change the name of requested host or server

Get more information about parsing filters here:  Manual - Parsing filters