Enabling Logging - Editing The Configuration File
Once you've found the right configuration file (or created one using another as a template), open it in your favorite text editor. The logging-related sections can be found near the end of the file. Here are the settings to look for:
Code: Select all
<appSettings>
<!--
enableLogging turns on client-side logging to a file in your temp directory (%TEMP%).
If you think you have this file configured properly, but no log file appears
in your temporary directory, check the system event log (we send messages there if we
can't open the log file).
<enableLogging> settings:
value="[true|false]" - When true logging is enabled, when false no messages will be logged.
-->
<add key="enableLogging" value="true" />
<!--
classesToLog lets you filter some log messages by class name. SourceGear support will be
able to suggest the appropriate class names to use for specific problems. "all" will
result in lots and lots (really) of messages.
<classesToLog> settings:
value="class1,class2,class3,..." - Log these classes; separate with commas.
value="all" - Log all messages from all classes.
-->
<add key="classesToLog" value="all" />
<!--
includeLoggingStackTraces includes stack traces with each log message in the client-side log.
enableLogging must be set to "true" for this to have any effect.
<includeLoggingStackTraces> settings:
value="[true|false]" - When true stack traces are included, when false they are not.
-->
<add key="includeLoggingStackTraces" value="false" /> <!--DO NOT
enable unless requested by SourceGear support, as it leads to very large log files.-->
<!--
includeThreadInfo includes thread names and IDs with each log message in the client-side log.
enableLogging must be set to "true" for this to have any effect.
<includeThreadInfo> settings:
value="[true|false]" - When true thread info is included, when false it is not.
-->
<add key="includeThreadInfo" value="true" />
</appSettings>
If you do not find these settings in the exe.config file, add them.
Next, set the enableLogging setting's value to true to start logging messages. Don't stop reading now, though; you haven't enabled any classes, so you probably won't see anything useful.
What Should I Log?
If you simply enabled logging but didn't set any classesToLog, you'll see very few messages in the log file. You'll want to change the classesToLog setting's value to one of the established logging classes to start seeing helpful information. A separate KB article lists the available logging classes: Available Vault Client Logging Classes.
You can always specify all as your logging class if you're not sure where the problem is, but your log file will be huge.
Remember that you'll need to restart your client to effect your changes to these settings. If you're logging for the Shadow Folder plugin, run iisreset at the server's command prompt to force IIS to reload the Shadow Folder plugin.
Finding the log file
If you enable logging, but leave the log file path to blank, the 'default' locations for logging can be found in the following locations:
Mac OS X:
~/Library/Logs/com.sourcegear.vault(pro).guiclient.log
Linux:
~/.sourcegear/Vault(Pro)_1/com.sourcegear.vault.guiclient/com.sourcegear.vault(pro).guiclient.log