Skip to content

Commit 9a9adce

Browse files
committed
Use syslog from xcp-idl for now
Core.Unix.Syslog got renamed to Syslog and made part of core.syslog. However we cannot link that as it conflicts with the Syslog module in xcp-idl. For now switch to using the syslog module from xcp-idl instead. Signed-off-by: Edwin Török <[email protected]>
1 parent 9d87488 commit 9a9adce

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

main.ml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -91,19 +91,21 @@ let use_syslog = ref false
9191
let log level fmt =
9292
Printf.ksprintf (fun s ->
9393
if !use_syslog then begin
94-
(* FIXME: this is synchronous and will block other I/O *)
95-
Core.Unix.Syslog.syslog ~level ~facility:Core.Unix.Syslog.Facility.DAEMON s;
94+
(* FIXME: this is synchronous and will block other I/O.
95+
* This should use Log_extended.Syslog, but that brings in Core's Syslog module
96+
* which conflicts with ours *)
97+
Syslog.log Syslog.Daemon level s;
9698
end else begin
9799
let w = Lazy.force Writer.stderr in
98100
Writer.write w s;
99101
Writer.newline w
100102
end
101103
) fmt
102104

103-
let debug fmt = log Core.Unix.Syslog.Level.DEBUG fmt
104-
let info fmt = log Core.Unix.Syslog.Level.INFO fmt
105-
let warn fmt = log Core.Unix.Syslog.Level.WARNING fmt
106-
let error fmt = log Core.Unix.Syslog.Level.ERR fmt
105+
let debug fmt = log Syslog.Debug fmt
106+
let info fmt = log Syslog.Info fmt
107+
let warn fmt = log Syslog.Warning fmt
108+
let error fmt = log Syslog.Err fmt
107109

108110
let pvs_version = "3.0"
109111
let supported_api_versions = [pvs_version; "5.0"]

0 commit comments

Comments
 (0)