Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space WBRIDGE and version 7.10.0

...

Div
Classe2e-button
Expand
titleClick here to expand an example logger configuration file...

This file reflects the default logger configuration with some filters added.

Code Block
languagejs
{
  "channels": {
    "access": {
      "sinks": {
        "default": {
          "type": "daily_rotated_file",
          "params": {
            "name_pattern": "logs/transaction_%Y-%m-%d.log"
          },
          "formatter": {
            "type": "pattern",
            "params": {
              "pattern": "{timestamp:%Y-%m-%d\t%T\t%z}\t{trx_id}\t{session_id}\t{component}\t{elapsed_ms}\t{trx_status}\t{domain}\t{trx_entry_type}\t{param1}\t{param2}\t{correlation_id}"
            }
          },
          "filters": [
            {
              "trx_level": ["SERVICE"],
              "domains": ["*", "!PSTATE", "!CONVERSATION"]
            },
            {
              "trx_level": ["IO_INTERNAL"],
              "domains": ["PSTATE", "CONVERSATION"]
            }
          ]
        }
      }
    },
    "error": {
      "sinks": {
        "default": {
          "type": "daily_rotated_file",
          "params": {
            "name_pattern": "logs/bridgeserver_%Y-%m-%d.log"
          },
          "formatter": {
            "type": "pattern",
            "params": {
              "pattern": "[{timestamp:%F %T %z}][{session_id:010}][{level}][Internal][{domain}][{code}][{message}]"
            }
          },
          "filters": [
            {
              "level": ["Info"],
              "domains": ["*"]
            }
          ]
        },
	    "monitoring": {
          "type": "std_err",
          "formatter": {
            "type": "pattern",
            "params": {
              "pattern": "e2eruntime[{pid}[{timestamp:%F %T UTC}[{level}[Internal[{domain}[{code}[[{message}]]"
            }
          }
        }
      }
    }
  }
}
Multiexcerpt
MultiExcerptNamedefinition_channel_sink
ElementDescriptionAllowed Values / Examples
channel

A channel is an object that describes the data that will be written to a log file. It is identified by a channel name.

Info
iconfalse

The following channel names are reserved for internal use of the xUML Runtime:

  • error
  • access
  • channels starting with "xUML" in any casing
errorWrite service logging data (bridgeserver log).
accessWrite transaction logging data.
sink

A channel can contain an arbitrary number of sinks. Sinks define the logging output and how it is written:

  • log file name and path patterns
  • log file format
  • logged content
Info
iconfalse

Sink names are not important but you need them to access the logging configurations via the xUML Runtime API.
Do not rename the sinks of the access and error channels.


Configuring Sinks

Sinks define the logging output and how it is written. You can define name and path of the log file, the log file format and filter out data to be logged.

...

We recommend to use the following subset:

...

Multiexcerpt include
MultiExcerptNamepattern_formatting_options
PageWithExcerptlogger

...

Format Variables for Log File Content

Find below all available format variables for xUML service (bridgeserver) logs and transaction logs

...

You can format the output using the : sign followed by a format string. Reasonable format strings are:

...

If you want to apply more sophisticated formatting, find more options on the {fmt} documentation pages for string formats and cpp documentation pages for date/time formats.

Multiexcerpt include
MultiExcerptNamecontent_formatting_options
PageWithExcerptlogger

Available Variables for Service Logs

...

FieldTypeDescriptionExample Usage
codeStringerror code
{code}
domainStringerror domain
{domain}
levelStringerror level
{level}
messageStringerror message details
{message}
pidNumeric

process id

{pid}
{pid:010}
session_idNumeric

session id

{session_id}
{session_id:010}
timestampDateTime

timestamp when the log occurred

{timestamp}
{timestamp:%F %T %z}

Available Variables for Transaction Logs

...

FieldTypeDescriptionExample Usage
componentStringname of the component
{component}
correlation_idStringcorrelation ID
{correlation_id}
domainStringerror domain name
{domain}
elapsed_msNumeric

milliseconds since session start

{elapsed_ms}
{elapsed_ms:010}
param1Stringparameter 1
{param1}
param2Stringparameter 2
{param2}
session_idNumeric

session ID

{session_id}
timestampDateTime

timestamp when the log occurred

{timestamp}
{timestamp:%F %T %z}
trx_entry_typeStringlog type
{trx_entry_type}
trx_idStringtransaction ID
{trx_id}
trx_statusStringstatus
{trx_status}

Example Patterns for Emulating the Classic Log Format

...