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.3.tbz
sha256=b0e981da365546f74a027c2d8ec6a5fa9e36965337b385747f702b897f4b0543
sha512=5605ca536241ffbec31ed58c679a7d51bd4774af773aa99df7d0475019abc873eafae1700510a79a7eddee30a88f1544982b54e4c3a89de072509e21eda0e2c3

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: 13 Jul 2019

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.

Dev Dependencies

None

Conflicts

None

OCaml

Innovation. Community. Security.