Format data

Format FilterX data as CEF, CSV, JSON, key=value pairs, LEEF, RFC5424 syslog, XML, or Windows Event Log XML strings.

AxoSyslog FilterX has several functions to format data into specific formats.


Common Event Format (CEF)

Format a FilterX dictionary into a Common Event Format (CEF) message with the format_cef() function.

Format data as comma-separated values

Format a FilterX dict or list into a delimiter-separated string with format_csv(), and set the columns, delimiter, and default value.

JSON

Serialize any FilterX value, including dicts and lists, into a JSON string with the format_json() function.

Key-value pairs

Format a FilterX dictionary as key=value pairs with format_kv(), with custom value and pair separators and quoting of values.

Log Event Extended Format (LEEF)

Format a FilterX dictionary into a LEEF 1.0 or 2.0 message with the format_leef() function.

RFC5424 syslog

Build an RFC5424 syslog message from FilterX data with format_syslog_5424(), and set its priority, timestamp, host, program, PID, and message ID.

Windows Event Logs XML

Format a FilterX dictionary into Windows Event Log XML with format_windows_eventlog_xml(), a specialized version of format_xml().

Format data as XML

Format a FilterX dictionary into XML with format_xml(), and see how attributes, text values, lists, and empty elements are mapped.

Last modified October 5, 2026: Filterx page ordering updates (1d4505aa)