Identity Director Administration Guide

Home 

This is not the latest version of Identity Director documentation.
View available documentation.

Create a trace file to troubleshoot the Mobile Gateway

This feature was introduced in Identity Director 2019.3.

Trace files contain logging that can be used for troubleshooting. You can configure a Mobile Gateway trace file using Windows registry, or using the Service.config file.
It is possible to configure two separate files using the two methods, with (for example) different levels of logging detail.

To enable logging for the Mobile Gateway, do one (or both) of the following:

  • In the Windows registry, at HKLM\Software\RES\LoggingOptions, set the value Enable (REG_DWORD) to 1
  • In the Service.config file, set the option enabled to true.

Windows registry

In the Windows registry, at HKLM\Software\RES\ITStore\Client Gateway, the following values are available:

Name

Type

Data

Remarks

EnableFileLogs

REG_DWORD

0 (default) or 1

Enables logging to a trace file.

FileLogLocation

REG_SZ

Example:
C:\temp

Full path to the location of the log file.

  • The IIS user must have access to the specified path.
  • If no path is specified, the trace file is saved to [installation folder]\App_Data\Logs.

FileName

REG_SZ

Example:
Gateway.log

Name of the trace file. If no name is provided:

  • the file name starts with ITSClient_Gateway_Log_
  • a new trace file is created at every IIS (re)start, with a time stamp at the end of the file name

LogFileDeleteExisting

REG_DWORD

0 (default) or 1

If this value is set to 1, the old trace file is deleted after every IIS (re)start.

FileLogThreshold

REG_DWORD

1 through 7

Specifies the level of detail in the trace file. Possible values are:

  • 1 (debug)
  • 2 (info)
  • 3 (status)
  • 4 (warning)
  • 5 (error)
  • 6 (critical)
  • 7 (fatal)

MaxLogFileSizeMB

REG_DWORD

Example:
10

Specifies the maximum size of the trace file in MB.

  • When the file reaches the maximum size, it overwrites the log from the start. Information that is overwritten, is lost.
  • If no maximum size is specified, the size of the file keeps increasing.

Restart IIS to apply the changes you made by creating or changing the registry values. For example, by executing the IISRESET command from a Command Prompt with Elevated Rights. Also restart the Transaction Engine.

Config file

You can find the Service.config file at [Mobile Gateway installation folder]\Config\.

The following line is included in this file by default:

<logFile enabled="false" path="" maxLogFileSizeKB="10240" severity="Debug"/>

You can configure the following options to control the size of the log and the way in which logging is handled. All settings are optional; if they are missing, their default value is used:

  • enabled: This option enables or disables logging. You can use false (default) or true.
    • This setting does not allow an empty value. If you do not specify a value, a configuration error occurs.
    • If you delete the logFile node itself, logging is disabled.
  • path: This option specifies the full path to the log file, including the file name.
    • If the log file does not exist, it is created.
    • If the path does not exist, the folder structure is not created and logging is disabled.
    • If you delete this option, the default file path is [Management Portal installation folder]\App_Data\Logs\logs.txt
    • If you do not specify a value, the default file path is used.
  • maxLogFileSizeKB: This option specifies the maximum file size in KB. The default value is 10240 (10MB).
    • If you set the value to 0, the default value is used.
    • This setting does not allow an empty value. If you do not specify a value, a configuration error occurs.
    • When the log reaches the maximum file size limit, it overwrites the log from the start. The overwritten information is lost.
  • severity: This option specifies the severity level above which the log calls are logged. The default value is Debug (This is the most permissive level and requires most disk usage).
    • You can specify the following severity values (case sensitive), ordered by severity level: Debug, Info, Status, Warning, Error, Critical, Fatal
    • This setting does not allow an empty value. If you do not specify a value, a configuration error occurs.

Changes you made in the config file are applied automatically.