Set Logging for SnapShot Using the Registry

SnapShot always outputs the maximum amount of logging information. Furthermore, by design there is no way to turn off logging. You can specify the name and location of the log file that is generated by adjusting a single registry setting.

Caution: Changes made to the Microsoft Windows registry happen immediately, and no backup is automatically made. Do not edit the Windows registry unless you are confident about doing so.Microsoft has issued the following warning with respect to the Registry Editor:"Using Registry Editor incorrectly can cause serious, system-wide problems that may require you to re-install Windows to correct them. Microsoft cannot guarantee that any problems resulting from the use of Registry Editor can be solved. Use this tool at your own risk."

By default, the SnapShot log is located in the temp directory of the Microsoft Windows user. This is the directory pointed to by the TEMP environment variable. You can determine the value of this TEMP variable in a number of ways including:

  1. Control Panel > System

  2. In a command prompt window, enter this command:

    echo %TEMP%

  3. In the Address Bar of Windows Explorer, enter this string:

    %TEMP%

The default log file name is SnapShot_<date-time>.log.

Both the directory and name of the SnapShot log can be specified by editing the registry; however, the date-time stamp will always be inserted immediately before the period.

To change the log file directory and/or name:

  1. Open the registry by clicking on Windows Start button and entering regedit in the search field.

  2. Navigate to this node:

    \HKEY_LOCAL_MACHINE\Software\Wow6432Node\JDEdwards\Snapshot

    The first time that you run SnapShot, it creates a value (shown on the right-hand pane in regedit) called LogFileName with the default value SnapShot.log. You can change this value or, if it does not exist yet, you can add the value with name LogFileName, type string value, and the directory and/or file name of your choice.

  3. The rules listed below are used for determining the final log file directory and name based on the value of LogFileName:

    • In all cases, the date and time that SnapShot.exe is run will be inserted immediately before the period in the extension of the file name.

    • If the value of LogFileName does not contain any backslashes, the name represents only the file name. The value of the Windows TEMP variable will be used as the directory.

    • If the value of LogFileName contains backslashes but does not start with a drive letter or a backslash, everything up to the last backslash represents a subdirectory or hierarchy of subdirectories below the directory designated by the Windows TEMP variable. Everything after the last backslash is the file name.

    • If the value of LogFileName starts with a backslash, it represents a subdirectory below the root directory of the drive (that is, directory "\"). The drive letter is derived from the drive specified in the Windows TEMP variable.

    • If the value of LogFileName starts with a letter followed by a colon and backslash, the letter is considered the drive letter where the log will reside. Any other applicable rule in the preceding rules above then apply.

    The following are examples of values of the LogFileName registry entry and the resulting log file path and name. In these examples, the assumed value of the TEMP variable is C:\Users\John\AppData\Local\Temp and assumes the log was created on June 5, 2012, at 3:46:9 PM.

    Value for LogFileName

    Resulting Log File

    SnapShot.log

    C:\Users\John\AppData\Local\Temp\SnapShot_2012-6-5_15-46-9.log

    MyFile.txt

    C:\Users\John\AppData\Local\Temp\MyFile_2012-6-5_15-46-9.txt

    MyTempDir\MyFile.txt

    C:\Users\John\AppData\Local\Temp\MyTempDir\MyFile_2012-6-5_15-46-9.txt

    MyTempDir\MyFile.txt

    C:\MyTempDir\MyFile_2012-6-5_15-46-9.txt

    D:\MyTempDir\MyFile.txt

    D:\MyTempDir\MyFile_2012-6-5_15-46-9.txt

  4. Save the changes and exit the registry.