package syslog-message

  1. Overview
  2. Docs
Syslog message parser

Install

Dune Dependency

Authors

Maintainers

Sources

syslog-message-1.2.0.tbz
sha256=f9eca2bfa26f0b410ab371b5b39aa816d2b46d4e18838d401e0e4d73ac43f70d
sha512=7bcf7d6b8085614a440c67a655c90353f56a55a7e0888fc9a1e7b7dec7a84bb32d36324fd157fd70942b0d868cc85e19272e7700ccc68362e15b5d4b6df66993

Description

This is a library for parsing and generating RFC3164 compatible Syslog messages.

Published: 04 Jun 2023

README

syslog-message - Syslog message parser

1.2.0

This is a library for parsing and generating RFC 3164 compatible Syslog messages.

Documentation

API documentation is available online.

match Ptime.of_date_time ((1970, 1, 1), ((0, 0, 0), 0)) with
| Some ts -> Syslog_message.decode ~ctx:{timestamp=ts; hostname="-"; set_hostname=false} "<133>Oct  3 15:51:21 server001: foobar"
| None -> failwith "Failed to parse Syslog message";;
- : Syslog_message.t option =
Some {Syslog_message.facility = Syslog_message.Local0; severity = Syslog_message.Notice; timestamp = <abstr>;
  hostname = "server001"; message = "foobar"}

Installation

This library can be installed with opam: opam install syslog-message

Testing

A test suite using qcheck is provided: opam install --build-test syslog-message

Dependencies (3)

  1. ptime
  2. dune >= "2.0.0"
  3. ocaml >= "4.08.0"

Dev Dependencies (1)

  1. qcheck with-test & > "0.5"

Used by (2)

  1. logs-syslog >= "0.4.0"
  2. syslog-rfc5424

Conflicts (1)

  1. result < "1.5"
OCaml

Innovation. Community. Security.