...
Div |
---|
|
Expand |
---|
title | Click here to expand an example logger configuration file... |
---|
| This file reflects the default logger configuration with some filters added. Code Block |
---|
| {
"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 |
---|
MultiExcerptName | definition_channel_sink |
---|
|
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. Info |
---|
| The following channel names are reserved for internal use of the xUML Runtime: - error
- access
- channels starting with "xUML" in any casing
|
| error | Write service logging data (bridgeserver log). | access | Write 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 |
---|
| 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 |
---|
MultiExcerptName | pattern_formatting_options |
---|
PageWithExcerpt | logger |
---|
|
...
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 |
---|
MultiExcerptName | content_formatting_options |
---|
PageWithExcerpt | logger |
---|
|
Available Variables for Service Logs
...
Field | Type | Description | Example Usage |
---|
code | String | error code | {code} |
domain | String | error domain | {domain} |
level | String | error level | {level} |
message | String | error message details | {message} |
pid | Numeric | | {pid} {pid:010} |
session_id | Numeric | | {session_id} {session_id:010} |
timestamp | DateTime | timestamp when the log occurred | {timestamp} {timestamp:%F %T %z} |
Available Variables for Transaction Logs
...
Field | Type | Description | Example Usage |
---|
component | String | name of the component | {component} |
correlation_id | String | correlation ID | {correlation_id} |
domain | String | error domain name | {domain} |
elapsed_ms | Numeric | milliseconds since session start | {elapsed_ms} {elapsed_ms:010} |
param1 | String | parameter 1 | {param1} |
param2 | String | parameter 2 | {param2} |
session_id | Numeric | | {session_id} |
timestamp | DateTime | timestamp when the log occurred | {timestamp} {timestamp:%F %T %z} |
trx_entry_type | String | log type | {trx_entry_type} |
trx_id | String | transaction ID | {trx_id} |
trx_status | String | status | {trx_status} |
Example Patterns for Emulating the Classic Log Format
...