package syslog-message

  1. Overview
  2. Docs
Syslog message parser

Install

Dune Dependency

Authors

Maintainers

Sources

syslog-message-0.0.2.tbz
sha256=78c3d0787a9b9d86469ef213968426aa7fb3253d49e62756ee2a114a144daca4
md5=0894adad6e936975d5aaf7ed32ec2908

Description

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

Published: 31 Oct 2016

README

syslog-message - Syslog message parser

0.0.2

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 (6)

  1. ptime
  2. astring
  3. topkg build
  4. ocamlbuild build
  5. ocamlfind build
  6. ocaml >= "4.02.3"

Dev Dependencies (1)

  1. qcheck with-test & < "0.5"

Used by (1)

  1. logs-syslog < "0.2.0"

Conflicts

None

OCaml

Innovation. Community. Security.