How to enable verbose logging in SOS Server (v 4 and v5)

A collection of information about SourceOffSite, including solutions to common problems.

Moderator: SourceGear

Post Reply
corey
Posts: 250
Joined: Tue Dec 30, 2003 10:13 am

How to enable verbose logging in SOS Server (v 4 and v5)

Post by corey » Thu Mar 11, 2004 3:49 pm

In previous versions of SourceOffSite, debug level logging could be enabled for the SOS Server through the Debug tab of the Server Manager. In 4.x, this is no longer the case (the Debug tab has been eliminated).

To change logging levels in 4.x, you must edit the .NET application config file, named "sosservice.exe.config". It can be found in the directory where you installed your 4.x SourceOffSite Server.

To change the logging level, modify the value of "General" within the <system.diagnostics><switches> section. The possible values are:

0 = Off
1 = Error
2 = Warning
3 = Info
4 = Verbose

The default level is 1.

Method logging can also be enabled by changing the value of "Method" to be 1 instead of 0.

The SOS Server log is called log.txt and is in the SOS Server directory.


SOS 5

In SOS 5, the sosservice.exe.config will look a bit different.

The file name for the SourceOffSite server log is located in the line that reads <param name="File" value="log.txt" />. Changing this filename will cause the SourceOffSite server to log information to the name specified.

SourceOffSite can either continue to log ot the same file, or can overwrite the log file with a fresh copy each time the SourceOffSite server service is started. By default, the log file will be appended to. If you wish to change this setting, find the line in the sosservice.exe.congif file that reads "<param name="AppendToFile" value="true" />, and change the value of "true" to "false."

Normally, SourceOffSite only logs errors to the log file in order to keep it from growing to an excessively large size. However, if you wish to gleen more information about the server's operations to troubleshoot a specific problem, you can set the logging level to a much higher level of output. To change the logging level, find the line in the sosserver.exe.config file that reads " <priority value="ERROR" />. You can change the value, in increasing order of verbosity, to INFO, WARN, or DEBUG. Please note that setting this value to DEBUG will provide an excessive amount of information for troubleshooting, but due to the size of the log file that would be created, it is not recommended to run indefinitely at this logging level.

Post Reply