entry_content#
- Default value:
{timestamp.iso_8601_local} {id} {component.uuid} {account.name} {account.peer.address}:{account.peer.port} {message}
- Optional:
Yes
- Values:
Format string.
- From version:
3.13.0
- Description:
The log format can be configured using a format string. By default, every line starts with the timestamp, but this can be changed. For example, to show the date first, only the peer address and a Unix newline:
[event-handlers/b904ed23-v254-4ccf-8abd-edcae4d3324f] entry_content = {timestamp.cwa_14051} {id} {account.peer.address} {message} {LF}
If the format string does not end with a newline character (
{LF}or{CR}{LF}) it will be added accordingly to the current platform (i.e.LFon Unix-like systems andCR+LFon Windows).The following variables (case-insensitive) are provided as context data containing information about the event being triggered:
id
uuid
message
msg
loglevel
peer.ip
peer.port
account.name
account.email
account.peer.address
account.peer.port
account.peer.protocol
account.peer.family
account.peer.country_code
account.peer.asn_number
account.peer.asn_name
account.uuid
component.name
component.type
component.uuid
server.name
server.uuid
server.instance_name
data.DATA_MEMBER_NAME
data_json
tb
timestamp.cwa_14051
timestamp.iso_8601
timestamp.iso_8601_fractional
timestamp.iso_8601_local
timestamp.iso_8601_basic
timestamp.iso_8601_compact
timestamp.timestamp
timestamp.year_decimal
timestamp.year_no_century
timestamp.month_decimal
timestamp.month_padded
timestamp.day_padded
timestamp.day_decimal
timestamp.day_of_year_padded
timestamp.hour_padded_24
timestamp.hour_decimal_24
timestamp.hour_padded_12
timestamp.hour_decimal_12
timestamp.hour_am_pm
timestamp.minute_padded
timestamp.minute_decimal
timestamp.second_padded
timestamp.second_decimal
msg is an alias for message. loglevel is the event severity: trace, info, warn, error, or critical. It is specified in the event definition and follows the group semantics described in Events, event handlers and the audit trail. The peer field contains only ip and port, copied from account.peer.address and account.peer.port. Events generated by the server process use IP address 0.0.0.0 and port 0. loglevel is included in default event JSON serialization. The msg and peer aliases are excluded. Use {msg}, {loglevel}, {peer.ip}, and {peer.port} in event handler templates.
data_json contains an indented JSON serialization of the event data, excluding tracebacks. It is generated on first use and cached for subsequent requests. tb contains the traceback, or an empty string when there is no traceback. Both are separate from data and available in all event handler templates. Account information is available through account, rather than data.avatar. Tracebacks can contain sensitive information and are omitted from default email, log, and webhook output. To include a traceback, explicitly add {tb} to the template.
DATA_MEMBER_NAME can be any of the supported data attributes specific to each event ID. You can discover the available data attributes as part of the Events reference documentation or the Web Manager Activity log.
Peer information includes an estimated country and the autonomous system (AS) that announces the IP address. country_code is a two-letter country code, asn_number is the AS identifier represented as a string with the ASN prefix (for example, ASN15169), and asn_name is the AS organization name. These values are empty strings for private addresses and addresses without matching information. Country and AS information is resolved locally using a database bundled with SFTPPlus and refreshed for each release. IP geolocation is an estimate and does not identify a person's location. For details, see IP geolocation database.
Note
This configuration is ignored when output_format is csv.
Since version 6.1.0, missing {data.KEY} values produce empty text. Message line breaks are replaced with spaces.