Enabling Logging - Finding The Configuration File
Except for the Shadow Folder plugin, the log is disabled by default (the Shadow Folder plugin only logs errors by default; you'll need to edit the file to see more verbose messages). You can enable the log file for any Vault client that supports logging by editing the <app>.config file for the executing assembly. Here are the locations of the <app>.config files for various Vault clients:
- Windows Forms Client - VaultGUIClient.exe.config
This file can be found in the folder where the Vault client executables are installed, usually C:\Program Files (x86)\SourceGear\Vault Client.
Updated 6/12/06
To enable client-side logging in the GUI Client for Vault 3.1.8 and later, open the Vault GUI Client and hold down the following keys on your keyboard:
The log will be created in your user's temp directory, %temp%. By default, all classes will be logged.Code: Select all
Control Alt Shift F12
- Shadow Folder - Web.config
This file can be found in the folder where the Shadow Folder plugin is installed, usually C:\Inetpub\wwwroot\VaultService\VaultShadowFolder. - Visual Studio Enhanced Client - devenv.exe.config
If you are using Vault 4.0.x and Visual Studio 2005, you must modify devenv.exe.config, which can be found in the folder where the Visual Studio 2005 executables are installed, usually C:\Program Files (x86)\Microsoft Visual Studio 8\Common7\IDE. Copy the logging section from below, edit devenv.exe.config and paste the logging section into the <appSettings> configuration section. Restart Visual Studio for the changes to take effect.
In Vault 4.1/Fortress 1.1/VaultPro, you can enable logging for the Enhanced Client within Visual Studio. Checking this option will set all the appropriate options and write a log file at %TEMP%\VaultVsipClient.txt. - Visual Studio Classic Client - devenv.exe.config
Starting with Vault 3.0, this file can be found in the folder where the Vault client executables are installed, usually C:\Program Files (x86)\SourceGear\Vault Client. Some versions of Vault will have it located in C:\Program Files (x86)\<Visual Studio version>\Common7\IDE.
Vault 2.0.6 and earlier do not include this file. Copy VaultGUIClient.exe.config to create devenv.exe.config for these versions of Vault. - Visual C++ 6 - msdev.exe.config
This file is not installed with the Vault clients. Copy VaultGUIClient.exe.config to create msdev.exe.config in the folder where the Vault client executables are installed, usually C:\Program Files (x86)\SourceGear\Vault Client. - Visual Basic 6 - vb6.exe.config
This file is not installed with the Vault clients. Copy VaultGUIClient.exe.config to create vb6.exe.config in the folder where the Vault client executables are installed, usually C:\Program Files (x86)\SourceGear\Vault Client. - Vault Command Line Client - vault.exe.config
This file is not installed with the Vault clients by default. Copy VaultGUIClient.exe.config to create vault.exe.config in the folder where the Vault client executables are installed, usually C:\Program Files (x86)\SourceGear\Vault Client. - Vault Cross Platform Client on Mac OS - com.sourcegear.vault.guiclient.config
This file is found inside the Vault-package/Contents/Resources/configuration/com.sourcegear.vault.guiclient. The log file, called com.sourcegear.vault.guiclient.log, is found through LaunchPad -> Other -> Console -> ~/Library/Logs. - Vault Client API - <the name of your application>.<.exe or .dll>.config
Take a copy of the VaultGuiClient.exe.config file or of the configuration file below, and place it in the directly where your application launches. Rename the config file to the same name as your application or dll. Edit the config file to enable logging and change the values to log from blank to all. The log file should show up in the users temporary directly like the previous log files listed. You can also feel free to set a path for the log in the config 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>
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.
Where is the Log File?
You can find the log file in the %TEMP% directory of the user running the Vault client. If you're running the Windows Forms or IDE clients, simply open a Windows Explorer window and type %TEMP% into the location bar at the top and press Enter to find your temporary directory. The file will be named something like "VaultGUIClient.txt" for the Windows Forms client, "VaultVsipClient.txt" for the Visual Studio 2005 client, "VaultIDEClient.txt" for the Visual Studio clients, etc.
To find the Shadow Folder's log file, look in the temporary directory of the user the web service runs as. Usually this is the ASPNET user, whose temp folder is something like C:\Documents and Settings\<your machine name>\ASPNET\Local Settings\Temp. If you have configured the Shadow Folder service to run under an impersonated account, check that user's Local Settings\Temp folder.
Sometimes an impersonated user's temporary directory can be %WINDIR%\Temp. If you can't find the file, but you're sure you enabled logging correctly, search your hard drives for files named Vault*.txt.
If you wish to set a specific path for the log file, add this to the <appSettings> section:
Code: Select all
<!--logFilePath is the fully qualified path to the name of the file which will be used for logging. If this value is unspecified, the default will be "%TEMP%\<Vault_AppName>.txt"
<logFilePath> settings: value="DRIVE:\PATH\FILENAME" - When true logging is enabled, when false no messages will be logged. -->
<add key="logFilePath" value="C:\SOMEPATH\SOMEFILENAME.txt" />