lanonna/pam/bin/pamlog.ml

14 lines
262 B
OCaml
Raw Normal View History

2024-04-17 09:37:16 +02:00
open Syslog
let logger = openlog "PAM"
let _ = at_exit (fun () -> closelog logger)
let info msg =
print_endline [%string "INFO: %{msg}"];
syslog logger `LOG_INFO msg
let error msg =
print_endline [%string "ERROR: %{msg}"];
syslog logger `LOG_ERR msg