Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

How to generate and read Commerce Server Staging (CSS) log files


View products that this article applies to.

Introduction

This article describes how to generate and read Commerce Server Staging (CSS) log files on a computer that is running Microsoft Commerce Server.

↑ Back to the top


More information

Important This article contains information about how to modify the registry. Make sure to back up the registry before you modify it. Make sure that you know how to restore the registry if a problem occurs. For more information about how to back up, restore, and modify the registry, click the following article number to view the article in the Microsoft Knowledge Base:
256986� Description of the Microsoft Windows registry

Generate CSS log files

Warning Serious problems might occur if you modify the registry incorrectly by using Registry Editor or by using another method. These problems might require that you reinstall your operating system. Microsoft cannot guarantee that these problems can be solved. Modify the registry at your own risk.

If CSS generates an error, you may want to generate CSS log files to help fix the issue. To do this, use one of the following methods.

Method 1

Use the following three commands to add the FullLogging global setting in the Drive\Program Files\Microsoft Commerce Server 2007\Staging\Bin path:
  • css setglobal fulllogging=YES
  • css stop
  • css start
Note The CSS service must be running when you modify global variables. These commands will add the FullLogging registry entry to the registry and set the value of the FullLogging registry entry to YES. To verify this addition, use the following command:
Css queryglobal

Method 2

You can use Registry Editor to manually add a registry entry. To add the FullLogging registry entry, follow these steps:
  1. Start Registry Editor.
  2. Locate and then click the following registry subkey:
    HKEY_LOCAL_ MACHINE\SOFTWARE\Microsoft\CSS
  3. On the Edit menu, point to New, and then click String Value.
  4. Type FullLogging in the Value name box, type YES in the Value data box, and then click OK.
  5. Exit Registry Editor.

How to use log files

Information about log files

Log files are written to the following location:
\Program Files\Microsoft Commerce Server 2007\Staging\Data\LOGFILES
The following log files are created:
  • Cssapi.log
  • Csssrv.log
The Cssapi.log file is created if you use the Microsoft Commerce Server Staging (CSS) command-line interface. This file will be renamed Cssapi.old when CSS is stopped and then restarted. The Cssapi.log file provides information, such as when a socket was created. Typically, this log file does not contain useful information.

The Cssrv.log file contains the information that you must have to understand any problem that has occurred in a replication. The Cssrv.log file has a size limit of 8 MB (8,388,608 bytes). As soon as this size limit is reached, the file is copied to the Cssrv.old file. Remember that the Cssrv.old file will be overwritten only the next time that the limit is reached. Therefore, you receive a maximum 16 MB of log data by default.

How to increase the size of the log file

Warning Serious problems might occur if you modify the registry incorrectly by using Registry Editor or by using another method. These problems might require that you reinstall your operating system. Microsoft cannot guarantee that these problems can be solved. Modify the registry at your own risk.

If you cannot find the error in the log file or in the old log file, you must increase the amount of data that is logged. To do this, follow these steps:
  1. Start Registry Editor.
  2. Locate and then click the following registry key
    HKEY_LOCAL_MACHINE\Software\Microsoft\CSS
  3. On the Edit menu, point to New, and then click DWORD Value.
  4. Type LogLimit In the Value name box, type 25165824 in the Value data box, type Decimal in the Base box, and then click OK.
  5. Exit Registry Editor.
  6. Stop and then restart the CSS service. To do this, use one of the following methods:
    • In Control Panel, open Services.
    • At a command prompt, type the following two commands:
      • Net Stop CSS
      • Net Start CSS
When you set the value of the LogLimit registry entry to 25165824, the Csssrv.log file can be as large as 24 MB. When the size of the file exceeds 24 MB, the log file will roll over to the Cssrv.old file. Therefore, you will have a total of 48 MB of data.

How to read log files

All log files have the same format. The log file has the following columns:
  • Date
  • Time
  • Type
  • Error Number
  • Thread Number
  • Text Message
The time stamp is only accurate to the closes second. The number of actions that are handled in a second makes this field less useful for search purposes. We recommend that you synchronize the clock on the start-point and end-point servers. To do this, use the following command:
Net time \\ComputerName /Set
The following table lists the six types of possible log entries.
Collapse this tableExpand this table
TypeFull name
DBGDebug
INFInformation
WRNWarning
ERRError
FTLFatal
UNKUnknown
Most events are marked DBG, and the value in the Error Number column is 0. If the type is not DBG or INF, you also receive a value in the Error Number column.

The Thread Number column helps you understand where CSS sends the file. If multiple destinations are configured, you can find the destination by determining when a thread is created. This information explains which files are sent.

The Text Message column describes the action that occurs. If an error occurs, you can discover what function was called and what line of source code was running. In some cases, you can also discover the return code.

↑ Back to the top


Keywords: KB918312, kbinfo, kbhowto

↑ Back to the top

Article Info
Article ID : 918312
Revision : 3
Created on : 8/10/2006
Published on : 8/10/2006
Exists online : False
Views : 429