Using a Registry Editor to Change Client Log File Settings

You can use a Registry Editor such as Regedit to edit the client log file settings for the following:

The log file settings allow you to enable or disable logging, set the maximum number of files, define the file locations, and so on. You can also specify a different location in which to store ViewX log files.

To change the log file settings:

  1. Access and Run a Registry Editor.
  2. Use the Registry Editor to locate the registry settings at the relevant location:
    • DB Client—The registry settings are at:

      HKEY_CURRENT_USER\SOFTWARE\Schneider Electric\ClearSCADA\DBClient

      Or:

      HKEY_CURRENT_USER\SOFTWARE\Schneider Electric\ClearSCADA\DBClientNamed

    • ViewX and Virtual ViewX—The registry settings are at:

      HKEY_CURRENT_USER\SOFTWARE\Schneider Electric\ClearSCADA\ViewX

    • ODBC—The registry settings are at:

      HKEY_CURRENT_USER\SOFTWARE\Schneider Electric\ClearSCADA\DBOdbc

    • OLE DB—The registry settings are at:

      HKEY_CURRENT_USER\SOFTWARE\Schneider Electric\ClearSCADA\OLEDB

  3. Define the registry settings:
    1. Right-click on a setting to display a context-sensitive menu. The settings include:
      • LogEnable—Enter True, or 1 to enable logging or enter False, or 0 to disable logging as required.
      • LogFileBase—Define the folder that will contain the log files and the filename prefix for the files. The prefix is the name of the files (it cannot contain certain characters, see your operating system documentation for more details).

        (If it does not exist already, Geo SCADA Expert creates the LogFileBase string value for ViewX log files when ViewX is first run. If required, you can specify a location for the ViewX log files before ViewX is first run, by manually creating and configuring the LogFileBase entry for those files.)

        If the specified path is invalid, Geo SCADA Expert will ignore the invalid registry value and will store the log files at the default location (see File Locations (Default)).

        If the specified path is invalid and the default file location cannot be found, logging will be disabled.

      • LogMaxFiles—Enter the maximum number of log files that are to be retained for each set of log files. Once this limit is reached, whenever a new log file is created, the oldest log file is deleted (to make way for the new file).
      • LogMaxSize—Enter the largest size of a log file. The size is in kilobytes.

        The actual file size is likely to exceed the size that is specified in this field. This is because the server completes writing the full line of log entries before the file size is checked.

        Example:

        The server is running the Crystal Reports driver which uses ODBC to access the database. The Crystal Reports driver has a process ID of 03B0.

        The maximum number of files is set to 2, and there are already 2 files: DBOdbc03B0_001.log and DBOdbc03B0_002.log

        When the DBOdbc03B0_002.log has reached its maximum size, a third log file is created—DBOdbc03B0_003.log. To make room for the new file, the oldest log file (DBOdbc03B0_001.log) is deleted.

      • LogOldFiles—Enter the number of sets of log files that can be stored for each instance of an application (each Process ID for ODBC and Client logs or each head for ViewX logs).

        For many systems, the default setting of 1 is adequate. (For ViewX and Virtual ViewX log files, the default is 2.)

        If the number of log file sets reaches the defined amount for a Process ID or head, any new sets of log files will use the space occupied by the oldest existing log files (the oldest sets of files are deleted). The existing files are renamed.

        The renaming of client log files (other than ViewX and Virtual ViewX log files) works in the same way as the renaming of other log files, such as server log files. That is, the oldest set of log files are deleted once the limit is reached, and the file extensions of the oldest remaining log files are incremented by one (see Define the Server Logging Settings in the Geo SCADA Expert Guide to Server Administration).

         

        The number of old DBClient log files to keep is set to 2. The client stores 3 sets of DBClient log files:

        DBClientNamed_ServerIcon_001.log (current)

        DBClientNamed_ServerIcon_001.log_2 (previous)

        DBClientNamed_ServerIcon_001.log_3 (one before previous)

        The client is restarted and so a new DBClient log file needs to be created.

        The client deletes the oldest DBClient log file (DBClientNamed_ServerIcon_001.log_3) and renames the existing files:

        DBClientNamed_ServerIcon_001.log is renamed so that it becomes DBClientNamed_ServerIcon_001.log_2.

        DBClientNamed_ServerIcon_001.log_2 is renamed so that it becomes DBClientNamed_ServerIcon_001.log_3.

        The new DBClient log file is stored as DBClientNamed_ServerIcon_001.log

        The numbering of ViewX and Virtual ViewX log files works in a slightly different way to other log files. The first time that a ViewX or Virtual ViewX log file is archived, its filename is appended with '.0.log'. When more records are added, and the next log file is archived, the number that is appended to that log file's filename is incremented by 1. The filename of the current file that is logged is not appended with any number. The latest archived log file has the filename with the highest number. The oldest set of log files is deleted once the limit is reached. However, the location of, and way in which, the numbering increments in the oldest remaining log files differs slightly to that of other log files.

        Each time that ViewX or Virtual ViewX starts logging a session, it will not create a new log file and will continue to add to the most recent log file.

         

        The number of old ViewX log files to keep is set to 2. The client stores 3 sets of ViewX log files:

        SE.Scada.ViewX_Session1.log (current)

        SE.Scada.ViewX_Session1.1.log (previous)

        SE.Scada.ViewX_Session1.0.log (one before previous)

        While the ViewX client is running, the current log file reaches its maximum size, and so a new ViewX log file needs to be created.

        The client deletes the oldest archived ViewX log file (SE.Scada.ViewX_Session1.0.log).

        The new ViewX log file is stored as SE.Scada.ViewX_Session1.2.log

        To distinguish between ViewX log files and Virtual ViewX log files, the filenames of the latter are prefixed with the text 'Virtualized_'.

         

        Virtualized_SE.Scada.ViewX_Session1.log

        You should consider the amount of storage space that is available before you define the number of old files that are to be retained. You should also consider how often the client is restarted. For many systems, the default settings are adequate.

    2. Select the Modify option to display the Edit window.
    3. Enter the required setting in the Value Data field (see step i for the required settings).
    4. Select the OK button to confirm the setting.
    5. Repeat the sub-procedure (steps i to iv) for each logging setting.

Further Information

The location of the registry settings for server-side logging: see Logging and Monitoring in the Geo SCADA Expert Guide to Server Administration.


Disclaimer

Geo SCADA Expert 2022