package win-eventlog

  1. Overview
  2. Docs
Write to the Windows event log

Install

Dune Dependency

Authors

Maintainers

Sources

v0.2.tar.gz
md5=fc063081174b4bec76a4bec1cab972c8

Description

This library contains functions to write low-level events to the Windows event log, and to create a Log reporter which writes log messages to the event log.

Published: 14 Jun 2018

README

Bindings to the Windows event log

This library allows you to log via the Windows event log from OCaml programs.

A low-level example:

let log = Eventlog.register "Mirage.exe" in
let category = 0 and event = 1 in
Eventlog.report log `Success category event [|
  "insertion string 1";
  "insertion string 2";
|]

You may wish to use the Log reporter interface instead:

let log = Eventlog.register "Mirage.exe" in
Logs.set_reporter (Log_eventlog.reporter log ());

Log.err (fun f -> f "This is an error");
Log.info (fun f -> f "This is informational");
Log.debug (fun f -> f "This is lowly debugging data");

Please read the API documentation.

For more context, please read the MSDN ReportError example.

Please note that this code will compile on non-Windows platforms, but this is for debugging only.

Dependencies (4)

  1. logs
  2. result
  3. jbuilder >= "1.0+beta10"
  4. ocaml

Dev Dependencies

None

Conflicts

None