package logs-syslog
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=a61e6a97e21579f510222433361b2dc5f75863e11aebbafe413d577ba31ad9d5
sha512=574462f493dee3be9a42fb87d9fca590618aaceb36160c1c7242aef71d1cd804f280e508793fc1e14809126a9d7438a521829aca0e807057a147013bced3f528
Description
This library provides log reporters using syslog over various transports (UDP, TCP, TLS) with various effectful layers: Unix, Lwt, MirageOS. It integrates the Logs library, which provides logging infrastructure for OCaml, with the syslog-message library, which provides encoding and decoding of syslog messages (RFC 3164).
Published: 29 Aug 2024
README
Logs-syslog - Logs output via syslog
v0.4.1
This library provides log reporters using syslog over various transports (UDP, TCP, TLS) with various effectful layers: Unix, Lwt, MirageOS. It integrates the Logs library, which provides logging infrastructure for OCaml, with the syslog-message library, which provides encoding and decoding of syslog messages (RFC 3164).
Six ocamlfind libraries are provided: the bare Logs-syslog
, a minimal dependency Unix Logs-syslog-unix
, a Lwt one Logs-syslog-lwt
, another one with Lwt and TLS (RFC 5425) support Logs-syslog-lwt-tls
, a MirageOS one Logs-syslog-mirage
, and a MirageOS one using TLS Logs-syslog-mirage-tls
.
Since MirageOS3, syslog is well integrated:
let logger =
syslog_udp
(syslog_config ~truncate:1484 "nqsb.io" (Ipaddr.V4.of_string_exn "192.168.0.1"))
net
...
register "myunikernel" [
foreign
~deps:[abstract logger]
Documentation
API documentation is available online.
Installation
This is targeting other libraries (apart from syslog-message) which are released to opam-repository.
opam pin add syslog-message --dev-repo
opam pin add logs-syslog https://github.com/hannesm/logs-syslog.git
Dependencies (5)
-
syslog-message
>= "1.0.0"
- ptime
-
logs
>= "0.5.0"
-
dune
>= "1.1.0"
-
ocaml
>= "4.03.0"
Dev Dependencies
None
Used by (1)
-
albatross
>= "2.1.0"
Conflicts (5)
-
tls-mirage
< "1.0.0"
-
tls-lwt
< "1.0.0"
-
tcpip
< "7.0.0"
-
mirage-clock
< "3.0.0"
-
mirage-kv
< "3.0.0"