package win-eventlog

  1. Overview
  2. Docs
Log via the Windows event log from OCaml programs

Install

Dune Dependency

Authors

Maintainers

Sources

win-eventlog-0.4.tbz
sha256=f67b192436e2716eaab0396643a73ca8b3af92f22510d6a5f3f43080dcdb0169
sha512=8e5de12612c2d686e9ae2961283df002c5ed8b071c19f13792b36aa3d704ca6328f25adc4e7e0e30d37c36d05a13ec7e88a6ca313a24a086846b52ec8c265485

Description

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";
|]

Published: 31 Aug 2021

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");

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

  1. base-unix
  2. logs
  3. result
  4. ocaml >= "4.08"
  5. dune >= "2.9"

Dev Dependencies (1)

  1. odoc with-doc

Conflicts

None