Salesforce

Logging (Magic xpi 4.13)

« Go Back

Information

 
Created BySalesforce Service User
Approval Process StatusPublished
Objective
Description

Logging (Magic xpi 4.13)

Enables the programmer to dynamically start and stop filtering options. The effect will be immediate and will not update the Magic.ini file.

Syntax:

Logging (Logical startstop, Alpha filter)

Parameters:

startstop: A logical value in which True will start the filter (set the value to true) or False will clear the value, depending on the property. For example, if the Oracle filter is set to Developer, False will set it to None.
If the Start/Stop parameter is false, the DBMS parameter may appear without the extra information. For example: Logging ('FALSE'LOG, 'DB2/400')

filter: An Alpha string defining the filter option. Valid values are:

  • LogSynch

  • ExecutionLogFileName=(file name)

  • Btrieve= (N, D, S, or C)

  • Pervasive= (N, D, S, or C)

  • DB2/400= (N, D, S, or C)

  • ORACLE= (N, D, S, or C)

  • AS/400= (N, D, S, or C)

  • DB2= (N, D, S, or C)

  • ODBC= (N, D, S, or C)

  • MicrosoftSQLServer = (N, D, S, or C)

  • Memory= (N, D, S, or C)

  • MySQL= (N, D, S, or C)

  • ALL

  • RESET

Returns:

Logical – True for Success or False for Failure.

Examples:

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.

Logging('TRUE'LOG,'MicrosoftSQLServer=C') – In the next Data Mapper step, you insert records into an MSSQL database. Then, during execution, a <ProjectName>_error.log is created in the %log% directory and is updated with the Insert operation in the Customer logging level.

Note:

If an invalid filter (or blank) is used, the function will return False.

If an external log is not set and the Debug mode is not set, the function will return False.

If an external log is set using ExecutionLogFileName and the file cannot be created, the function will return False. A message should be sent to the mgerror.log file.

If the Start/Stop parameter is evaluated to False and the DBMS parameter is evaluated to either D, S, C (for example, 'False','ODBC=D'), the gateway will be set to N.

If the Start/Stop parameter is evaluated to True and the DBMS parameter is evaluated to N (for example, 'True','ODBC=N'), the gateway option will be ignored and the function will return False.

The function will affect all running contexts.

The set values will only be valid for the current Magic xpi Server instance.

If ALL is used together with Stop (False), all values will be set to False.

If ALL is used together with Start (True), then all non-gateway logical values will be set to True.

RESET is used to reset all values to the INI values. If RESET is used with Start (True), all values will be reset. If RESET is used with STOP, it will be ignored and the function will return False.

See also:

How Do I Create a Dynamic Gateway Log?

Reference
Attachment 
Attachment