Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Module Syslog_message
Syslog message parser and unparser
Syslog-message is a module for handling syslog messages, as defined in RFC 3164.
The parse function transforms a string to a syslog message t, using a context of default parameters. Such a message can be transformed into a string to_string or pretty printed pp_string, pp.
ctx provides additional information to the parse function in case one of the sub-parsers fails.
timestamp: A timestamp
hostname: Hostname, IPv4 or IPv6 address of the sender. "-" if unknown.
set_hostname: If true, the parse function will skip its hostname sub-parser and use the hostname from ctx instead.
set_hostname is automatically set by the timestamp sub-parser when it fails, because at this point it is no longer possible to determine the hostname from the input string.