Salesforce

Logging Mechanism (Magic xpi 3.x)

« Go Back

Information

 
Created ByKnowledge Migration User
Approval Process StatusPublished
Objective
Description

Logging Mechanism (Magic xpi 3.x)

Magic xpi lets you produce a log for the entire project or for specific components.

Project Logging

Logging information is needed during the design and debugging of the projects. However, debugging excessively large amounts of information may impair the system’s performance. Therefore, the logging information should be reduced in the production environment. You can define whether to enable or disable the Activity Log in the Magic xpi Monitor's Actions menu, where you can select the Start Logging option to enable logging. You can also determine which Activity log messages will be monitored and which will be suspended.

Another recommendation to improve efficiency is to increase the Refresh Rate interval in the Advanced Properties dialog box. To set the Advanced Properties, go to the Settings menu, select the Activity Log dialog box and click Advanced.

To enable efficient operation of the Magic xpi Server, you can stop the Magic xpi Server from sending messages to the Activity Log. You can switch on the Activity Log on demand, without having to restart the server. This provides runtime troubleshooting capabilities. If there is a connection to a running server, you can access the Server Logging Control to manage the messages that are sent to the Activity Log.

When you suspend a server activity log message, the new settings are moved to the deployment environment in the following two ways:

  • The data source ifs_mytype that saved all the messages is updated according to the internal database as defined in the Monitor environment and is also the server internal database. Each project and server that is loaded from that point on will have the new settings.

  • The current loaded project is called. This takes place only when a project is opened. In order for this to succeed, both the server and monitor deployment environment need to be the same.


Magic xpi also provides various flags for controlling the logging of Magic xpi projects.

The Ifs.ini file provides the following logging flags, which are listed here according to priority:


The Ifm.ini file provides the following logging flags:

The Logging Process

  1. When opening a project, if RemoteTuning=Y, then the first screen that is automatically opened is the Projects View. When this screen cannot connect to the MPSServer or if it was never displayed, the flag ConnectToRunningServer=Y is checked.

  2. If the flag is Y, the process will try to automatically connect to the running project. If it is N, the next sections, where the project status and Logging mode is retrieved, are skipped.

  3. The process tries to retrieve information about the project from the uniPaaS Server (broker). The uniPaaS server address is set as following:

    1. First the process tries to connect to the MPSServer. The next message is displayed: 'Connecting to Server: '&TranslateNR(Trim(<MPSServer>))&' - Please wait').

    2. If the connection is successful, the Flow Status is checked.

    3. If the connection fails or the above server definition is empty, the loaded project servers are used as the server address in order to retrieve the requested information. The following message is displayed: 'Connecting to Server:')&' '&TranslateNR(Trim(<ServerRep.EntryName>)&'('&TranslateNR(Trim(<Server Machine Name>))&')'&MlsTrans(' - Please wait').

  4. If the project was connected and the Flow Status was successfully retrieved, the Logging Status is checked. The uniPaaS server address is set as following:

    1. First try to connect to the MPSServer.

    2. The next message is displayed: 'Connecting to Server:) '&TranslateNR(Trim(<MPSServer>))&' - Please wait').

  5. If the connection was successful, the Project’s Logging Mode (ON/OFF) is checked.

  6. If the connection failed or the above server definition was empty, the loaded project servers are used as the server address in order to retrieve the requested information.

The next message is displayed: 'Connecting to Server:')&' '&TranslateNR(Trim(<ServerRep.EntryName>))&'('&TranslateNR(Trim(<Server Machine Name>))&')'&MlsTrans(' - Please wait')

  1. If RemoteTuning=N: No uniPaaS broker is checked to see whether the project is currently running in it and no project Status nor Logging mode is retrieved.

Dynamic Component Logging

Magic xpi lets you decide, on the fly, whether you want the Server to stop adding Log entries to the internal database or start adding Log entries when no logging takes place.

You can set the DisableActivityLog flag in the Magic.ini file to instruct the Server at start up to have no logging at the executed project. This is the default of the current instance of the project execution. This can be changed using the Monitor's Start Logging option.

In component logging you can add information to be sent to the Activity Log. See also Logging – Component Properties.

It is possible to enable or disable component logging. Component logging can be manipulated at two levels:

  • Stopping all component logging: When the G.sys.ComponentLogging global logical variable is set to TRUE, component logging is turned off. Other logging information will continue to be sent to the Activity Log.

In the Activity Log View you can enable or disable component logging from the Actions menu. This is a toggle type menu, meaning that if component logging is enabled, it will be called Stop Component Logging, and if it is disabled, it will be called Start Component Logging.

Selecting this menu entry will update the G.sys.ComponentLogging variable accordingly.

  • Stopping component logging for a context: When the C.sys.ContextLogging variable is set to TRUE, component logging for the current context is turned off.

When Logging is enabled, then:

  • When G.sys.ComponentLogging is set to TRUE and C.sysContextLogging is set to TRUE, each component in the context will log information to the activity log according to the details set in the Logging tab.

  • When G.sys.ComponentLogging is set to FALSE, no component information will be sent to the Activity Log.

Both variables can be updated like other variables during runtime.

Reference
Attachment 
Attachment