Salesforce

How Do I Create a Dynamic Gateway Log? (Magic xpi 4.13)

« Go Back

Information

 
Created BySalesforce Service User
Approval Process StatusPublished
Objective
Description

How Do I Create a Dynamic Gateway Log? (Magic xpi 4.13)

In some cases, you might need to debug a specific Data Mapper step which connects to a database, or you might need the log to run at certain intervals. In these instances, you can use the Logging function to enable and disable the gateway log dynamically. This does not change the logging settings in the Magic.ini file. The syntax is:

Logging(startstop, filter)

where:

  • startstop is ‘True’Log to start logging, or ‘False’Log to stop it.

  • filter is a keyword that determines which logging entry will be started or stopped.

Here are some examples:

The Logging Expressions

Effect

Logging('True'Log, 'Levels')

Turns on logging for Levels.

Logging('False'Log, 'Recompute')

Turns off logging for recompute activity.

Logging('False’Log, 'ALL')

Turns off all logging.

Logging('True'Log, 'RESET')

Sets logging back to the value stored in the Magic.ini file.

Logging('True'Log, 'Oracle=D')

Sets Oracle logging to the Developer level.

To create a dynamic gateway log, follow these steps:

  1. Define a logical type variable.

  2. Add a Flow Data step containing the following lines:

    1. Update your variable with Logging ('TRUE'LOG,'MicrosoftSQLServer=D'). This setting is for MSSQL. If you need another database type, you should change the name accordingly.

    2. Update your variable with Logging ('TRUE'LOG,'Gateway').

    3. Update your variable with Logging ('TRUE'LOG,'ExecutionLogFileName=< file name >').

If you do not give a path, the file will be created under the <Magic xpi installation>\Runtime folder.

  1. To stop the gateway log, create another Flow Data step and set your Logical variable to update your variable with Logging ('FALSE'LOG,'MicrosoftSQLServer=D').

Reference
Attachment 
Attachment