xUML Runtime Logger Configuration
On startup, the xUML Runtime accepts a file specifying a logger configuration (see --logging.config.file
on xUML Runtime Command Line Options). This configuration file is a JSON file in which you can a complex logging configuration, like which logging data to write where to in which case.
Concepts
The logging concept of the xUML Runtime is build around the concepts of channels and sinks.

Element | Description | Allowed 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. The following channel names are reserved for internal use of the xUML Runtime:
|
| Write service logging data (bridgeserver log). |
| Write transaction logging data. | ||
sink | A channel can contain an arbitrary number of sinks. Sinks define the logging output and how it is written:
Sink names are not important but you need them to access the logging configurations via the xUML Runtime API (refer to Integration User's Guide for further information). 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.
Log File
Property | Description | Allowed Values | Example | |
---|---|---|---|---|
type | Define whether to write to a file (daily or hourly rotation), or to std_out or std_err. |
| Write logs to std_out. |
|
| Write logs to std_err. | |||
| Write to a daily rotated log file. | |||
| Write to an hourly rotated log file. | |||
params | Define parameters of the sink. At the moment, only accepted parameter is |
| Defines the relative path and file name pattern of the log file. See Name Patterns for Log Files for available placeholders. |
Log File Content Format
The formatter attribute defines the format in which the log data will be logged to the log file. Using type pattern
, you can define a custom log pattern using format variables.
Property | Description | Allowed Values | Example | |
---|---|---|---|---|
type | Define the format in which the log data will be logged to the log file. |
| Log the log file data in JSON format. | Example 1:
Example 2:
|
| Log the log file data according to a given pattern. The used pattern is defined in the params attribute via attribute pattern. | |||
params | If format type is | See Format Variables for Log File Content for more on the available variables. | ||
legacy_utc | Enable UTC timestamp for monitoring logs. This is a legacy option. Do not use. | true | Use UTC in timestamp. | |
false | Do not use UTC in timestamp. |
Log File Content Filter
The filters attribute defines an array of filters to select which log items should be logged, and which not. You can filter by
log level (level, service log)
transaction log level (trx_level, transaction log)
error domain (service log and transaction log).
You can negate a filter by putting an exclamation mark (!
) in front of the filter term (see example below). All filter elements are applied in order of definition.
Property | Description | Allowed Values | |
---|---|---|---|
level | Provide an array of service log levels to let pass through the filter. | One of | |
trx_level | Provide an array of transaction log levels to let pass through the filter. | One of | |
domains | Provide an array of error domains let pass through the filter. You can invert the filtering by adding a |
| Nothing is filtered. |
list of domains | Let logs containing one of the listed domains pass through the filter. You can invert the filtering by adding a |
Example (from the default logger configuration)
"filters": [
{
"domains": ["*", "!PSTATE", "!CONVERSATION"],
"trx_level": ["SERVICE"]
},
{
"domains": ["PSTATE", "CONVERSATION"],
"trx_level": ["IO_INTERNAL"]
}
]
Filter Item | Line | Description |
---|---|---|
1 |
| This filter item applies to log items with transaction log level |
| For transaction log level The asterisk is not a default configuration but has to be added explicitly if needed. | |
2 |
| This filter item applies to log items with transaction log level |
| For transaction log level |
Name Patterns for Log Files
As a name pattern for log files to use in attribute name_pattern
, you can use all specifiers listed on boost Date Time Format Flags.
We recommend to use the following subset:
Pattern | Description |
---|---|
| year, 4 digits |
| month, 2 digits |
| day of the month, 2 digits |
| hour, 24-hour format, 2 digits |
| minute, 2 digits |
| second, 2 digits |
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:
Pattern | Description | Example Output |
---|---|---|
Format Patterns For Date/Time Variables | ||
| Year as a 4-digit decimal number. |
|
| Month as a 2-digit decimal number (range [01,12]). |
|
| Day of the month as a decimal number (range [01,31]). |
|
| Equivalent to |
|
| Hour as a 2-digit decimal number, 24 hour clock (range [00-23]) |
|
| Minute as a 2-digit decimal number (range [00,59]) |
|
| Second as a 2-digit decimal number (range [00,60]) |
|
| Equivalent to "%H:%M:%S" (the ISO 8601 time format). |
|
| Offset from UTC in the ISO 8601 format, or no characters if the time zone information is not available. |
|
Format Patterns for Numeric Variables | ||
| Sign-aware zero-padding for numeric types, where 0 is the indicator to apply the padding and 99 the maximum padding width. |
|
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.
Available Variables for Service Logs
Refer to xUML Service Standard Log for more information on this log.
Field | Type | Description | Example Usage |
---|---|---|---|
code | String | error code |
|
domain | String | error domain |
|
level | String | error level |
|
message | String | error message details |
|
pid | Numeric | process id |
|
session_id | Numeric | session id |
|
timestamp | DateTime | timestamp when the log occurred |
|
Available Variables for Transaction Logs
Refer to Contents of the xUML Transaction Log for more information on the listed variables.
Field | Type | Description | Example Usage |
---|---|---|---|
component | String | name of the component |
|
correlation_id | String | correlation ID |
|
domain | String | error domain name |
|
elapsed_ms | Numeric | milliseconds since session start |
|
param1 | String | parameter 1 |
|
param2 | String | parameter 2 |
|
session_id | Numeric | session ID |
|
timestamp | DateTime | timestamp when the log occurred |
|
trx_entry_type | String | log type |
|
trx_id | String | transaction ID |
|
trx_status | String | status |
|
Example Patterns for Emulating the Classic Log Format
Log | Example Definition |
---|---|
xUML Service Log |
|
Transaction Log |
|
Monitoring |
|
Related Content
Related Pages: