Salesforce

Basic Logging Level (Magic xpa 4.x)

« Go Back

Information

 
Created BySalesforce Service User
Approval Process StatusPublished
Objective
Description

Basic Logging Level (Magic xpa 4.x)

Magic xpa enables you to use a Basic logging level. This level is meant to be used for troubleshooting of production (and also testing) systems, especially in the areas of communication and component handshaking (Since version: 2.4b). You can use the Basic logging functionality in a number of modules by setting the logging level to B. The modules and their corresponding location for setting the logging level are:

  • Magic RIA client – The Windows module (MgxpaRIA_yyyy_mm_dd.log). This is defined in the InternalLogLevel property in the RIA execution properties file (publish.html)). For other log levels, the client can use a log level up to the level defined in the server (InternalLogLevel entry setting in the [MAGIC_RIA] section in the Magic.ini file). The B log level will not use this mechanism and will be allowed no matter what the log level is defined in the server.

  • Magic Web requester – Apache module (requester.log). This is defined in the Log entry of the Mgreq.ini file.

  • Magic Broker (broker.log). Similar to the Web requester, the broker will log basic requester’s level messages according to the Mgreq.ini residing in the same folder. In addition, basic logging can also be defined in the broker’s level, according to the Log entry in the Mgrb.ini file.

  • Magic server – For RIA clients only (mgerror.log). Similar to the Web requester, the servers will log basic requester’s level messages according to the mgreq.ini residing in the same folder. In addition, basic logging can also be defined in the server level. Unlike other server logs which are defined in the logging section and written to the ExternalLogFileName, the B log level will be taken from the [MAGIC_RIA] section and will output the entries to the GeneralErrorLog.

  • Magic Space middleware – The Space middeware module. By default, basic logger messages are printed to different log files according to the printing module and process ID.

    To turn on the basic logger for the Magic Space middleware, change the Root level to BASIC in the GigaSpaces-xpa\config\log4j2.xml file.

    To print all basic messages into a single file, in the log4j2.xml file, change the fileName property of the rolling file appender named basic-appender to a constant name. For example,
    change:

    RollingFile name="basic-appender" fileName="${sys:com.magicsoftware.xpa.home}\Logs\${sys:com.magicsoftware.xpa.logging.subfolder}${sys:com.magicsoftware.xpa.logging.module}_${sys:pid}.log

    to:

    RollingFile name="basic-appender" fileName="${sys:com.magicsoftware.xpa.home}\Logs\${sys:com.magicsoftware.xpa.logging.subfolder}MyBasicLogFile.log

Note:

  • Each RIA client logs information locally on its local hard disk. If an administrator has access to this local disk, the administrator can retrieve this log file. From a performance point of view, it is not possible to transmit this log continually over the network to the server.

  • The values in the log are comma-delimited and a hyphen (-) represents a non-existing value.

  • When the log file size reaches a threshold, a new log file is created and the old file is closed.

  • When a parallel program is called, a new executable is invoked, therefore a new log file is created.

The information that appears in the log for the Basic level of each module is detailed below.

RIA Client

  • Module name (= RIA)

  • PID

  • UTC Timestamp in the format of: YYYY-MM-DDThh:mm:ss.sZ

  • Message entering / Message leaving indication (MSGE/MSGL)

  • Context ID

  • Session counter – a counter incremented for each request in each context

  • Request ID – a unique identifier for the request itself

  • Client ID – an identifier within the request showing the RIA client originator

  • Server ID (web server host name)

  • Response time

  • HTTP return codes

  • HTTP headers

  • HTTP message size (in bytes)

For example:

RIA,5628,2014-02-13T11:20:21.2729430Z,MSGE,498685225412187200,2,-,000000003C082C7C_D_5628,10.9.6.191,93,0,MgxpaRuntimeExecutionTime: 94,0|MgBrokerWaitTime: 0|uniCompressedMessage: Y|Content-Length: 1384|Content-Type: text/html|Date: Thu, 13 Feb 2014 11:20:21 GMT|Server: Microsoft-IIS/7.5|X-Powered-By: ASP.NET,1510

Requester

  • Module name (= WebReq)

  • PID

  • UTC Timestamp in the format of: YYYY-MM-DDThh:mm:ss.sZ

  • Message entering / Message leaving indication (MSGE/MSGL)

  • Context ID

  • Session counter – a counter incremented for each request in each context

  • Request ID – a unique identifier for the request itself

  • Client ID – an identifier within the request showing the RIA client originator.

  • Server ID (Magic xpa server host/port)

  • HTTP message size (in bytes)

  • HTTP headers

For example:

WebReq,5624,2014-02-13T12:04:37.15310Z,MSGE,533973341325014016,10,1234,00000000F1CCF3C8_D_5624,my_server/5115,1510,InitialCookieName=Mycookie1 AuthenticationCookieName=Mycookie2

Broker/Server/Space

  • Module name (= Broker/Server/Space)

  • PID

  • UTC Timestamp in the format of: YYYY-MM-DDThh:mm:ss.sZ

  • Message entering / Message leaving indication (MSGE/MSGL)

  • Context ID

  • Session counter – a counter incremented for each request in each context

  • Request ID – a unique identifier for the request itself

  • Client ID – an identifier within the request showing the RIA client originator.

  • Server ID (Magic xpa server host/port)

  • Execution time

For example:

Broker,5423,2014-02-13T12:09:59.38045Z,MSGE,566513635659557952,1510,3668,000000003C082C7C_D_5423,my_server/5115,2300

Error Handling

When an error occurs, all modules defined with log level set to B will automatically write additional details (only for the current request) – the relevant information regarding that request that is being handled. Additional information regarding the error will be logged according to the module that encountered the error. This will include:

  • UTC Timestamp in the format of: YYYY-MM-DDThh:mm:ss.sZ

  • Error code(s)

  • Error description(s)

  • Specifically for Magic xpa servers, the Magic xpa (application) runtime tree (Prog) will be logged.

  • Specifically for Magic xpa servers, a list of all currently active database connections will be logged as well, together with any relevant SQL error or information.

  • Stack trace

This information will be written in sections. For example:

04/12/2013 16:49:30.123 Error: 120 test error

Runtime Tree: Prg A, Prg B.

Database Connections:

Oracle, my user, 153, error 153 description

MSSQL, my user2, ,

Stack trace:

Xxxxx xxx xx xx

Any error that does not allow the request to end properly, and return its response, is considered an error. A duplicate index, for instance, is only considered an applicative issue, but not an error.

Thread crashes, signals from the operating system and other fatal errors that force the context to terminate are considered errors.

  • In case of an error from the database, the SQL statement will be logged.

  • If the Display Full Messages environment setting is set to No, the database error will not be written to the log file.

MgxpaRIABuildNumber

The MgxpaRIABuildNumber header is added to the request in all the log levels of client logging. Since version: 3.3h

Reference
Attachment 
Attachment