13 lines
262 B
OCaml
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
|