lanonna/pam/bin/pamlog.ml
2024-04-17 09:37:16 +02:00

13 lines
262 B
OCaml

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