val create : C.t -> STACK.t -> hostname:string -> STACK.IPV4.ipaddr -> ?port:int -> ?truncate:int -> ?framing:Logs_syslog.framing -> ?facility:Syslog_message.facility -> unit -> (Logs.reporter, string) Stdlib.result Lwt.t
create c tcp ~hostname ip ~port ~truncate ~framing ()
is Ok reporter
or Error msg
. The reporter
sends log messages to ip, port
via TCP. If the initial TCP connection to the remote_ip
fails, an Error msg
is returned instead. If the TCP connection fails, an error is logged to the console c
and attempts are made to re-establish the TCP connection. Each syslog message can be truncated, depending on truncate
(defaults to no truncating). The hostname
is part of each syslog message. The default value of port
is 514, the default behaviour of framing
is to append a zero byte. facility
is the default syslog facility (see Logs_syslog.message
).