From f9cee51cff0b1b610bfb13c034cf238e8830c39f Mon Sep 17 00:00:00 2001 From: David Allsopp Date: Wed, 15 Aug 2018 11:55:53 +0100 Subject: [PATCH 1/4] Eliminate Warning 8 --- src/logs_syslog_lwt.ml | 12 ++++++++---- src/logs_syslog_lwt_tls.ml | 11 ++++++----- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/src/logs_syslog_lwt.ml b/src/logs_syslog_lwt.ml index c874f17..fcaf608 100644 --- a/src/logs_syslog_lwt.ml +++ b/src/logs_syslog_lwt.ml @@ -15,7 +15,8 @@ let udp_reporter ?hostname ip ?(port = 514) ?(truncate = 65535) ?facility () = f (Unix.error_message e) (Unix.string_of_inet_addr ip) port (Ptime.to_rfc3339 (Ptime_clock.now ())) msg ; - Lwt.return_unit) + Lwt.return_unit + | exn -> Lwt.fail exn) in (match hostname with | Some x -> Lwt.return x @@ -40,7 +41,8 @@ let tcp_reporter ?hostname ip ?(port = 514) ?(truncate = 0) ?(framing = `Null) ? Printf.sprintf "error %s in function %s while connecting to %s:%d" (Unix.error_message e) f (Unix.string_of_inet_addr ip) port in - Lwt.return (Error err)) + Lwt.return (Error err) + | exn -> Lwt.fail exn) in let reconnect k msg = Lwt_mutex.lock m >>= fun () -> @@ -73,8 +75,10 @@ let tcp_reporter ?hostname ip ?(port = 514) ?(truncate = 0) ?(framing = `Null) ? Printf.eprintf "error %s in function %s, reconnecting\n" err f ; Lwt.catch (fun () -> Lwt_unix.close sock) - (function Unix.Unix_error _ -> Lwt.return_unit) >>= fun () -> - reconnect send omsg >|= fun () -> should)) >>= fun n -> + (function Unix.Unix_error _ -> Lwt.return_unit + | exn -> Lwt.fail exn) >>= fun () -> + reconnect send omsg >|= fun () -> should + | exn -> Lwt.fail exn)) >>= fun n -> if n = should then Lwt.return_unit else diff --git a/src/logs_syslog_lwt_tls.ml b/src/logs_syslog_lwt_tls.ml index 09949dc..71980a1 100644 --- a/src/logs_syslog_lwt_tls.ml +++ b/src/logs_syslog_lwt_tls.ml @@ -24,17 +24,17 @@ let tcp_tls_reporter Tls_lwt.Unix.client_of_fd conf sock >|= fun t -> tls := Some t ; Ok ()) - (fun exn -> - Lwt.return @@ match exn with + (function | Unix.Unix_error (e, f, _) -> let err = Printf.sprintf "error %s in function %s while connecting to %s:%d" (Unix.error_message e) f (Unix.string_of_inet_addr ip) port in - Error err + Lwt.return @@ Error err | Tls_lwt.Tls_failure f -> let err = Tls.Engine.string_of_failure f in - Error (Printf.sprintf "TLS failure %s" err)) + Lwt.return @@ Error (Printf.sprintf "TLS failure %s" err) + | exn -> Lwt.fail exn) in let reconnect k msg = Lwt_mutex.lock m >>= fun () -> @@ -73,7 +73,8 @@ let tcp_tls_reporter Lwt.catch (fun () -> Tls_lwt.Unix.close t) (fun _ -> Lwt.return_unit) >>= fun () -> - reconnect send omsg) + reconnect send omsg + | exn -> Lwt.fail exn) in at_exit (fun () -> match !tls with | None -> () From 77c7ca8fa5e519b79e34ed1605686b5125266176 Mon Sep 17 00:00:00 2001 From: David Allsopp Date: Wed, 15 Aug 2018 11:56:22 +0100 Subject: [PATCH 2/4] Upgrade build system to Dune --- .gitignore | 7 ++-- .merlin | 8 ---- _tags | 14 ------- doc/api.odocl | 6 --- dune-project | 3 ++ opam => logs-syslog.opam | 14 +------ pkg/META | 63 -------------------------------- pkg/pkg.ml | 25 ------------- src/dune | 55 ++++++++++++++++++++++++++++ src/logs-syslog-lwt-tls.mllib | 1 - src/logs-syslog-lwt.mllib | 2 - src/logs-syslog-mirage-tls.mllib | 1 - src/logs-syslog-mirage.mllib | 2 - src/logs-syslog-unix.mllib | 1 - src/logs-syslog.mllib | 1 - 15 files changed, 63 insertions(+), 140 deletions(-) delete mode 100644 .merlin delete mode 100644 _tags delete mode 100644 doc/api.odocl create mode 100644 dune-project rename opam => logs-syslog.opam (59%) delete mode 100644 pkg/META delete mode 100644 pkg/pkg.ml create mode 100644 src/dune delete mode 100644 src/logs-syslog-lwt-tls.mllib delete mode 100644 src/logs-syslog-lwt.mllib delete mode 100644 src/logs-syslog-mirage-tls.mllib delete mode 100644 src/logs-syslog-mirage.mllib delete mode 100644 src/logs-syslog-unix.mllib delete mode 100644 src/logs-syslog.mllib diff --git a/.gitignore b/.gitignore index c332682..c881242 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,6 @@ _build/ -*.native -*.byte -*.install +logs-syslog.install +src/.merlin example/mirage-unikernel-*.opam example/.mirage.config @@ -15,4 +14,4 @@ example/syslog* *.key *.pem *.csr -certs/ \ No newline at end of file +certs/ diff --git a/.merlin b/.merlin deleted file mode 100644 index c91fef7..0000000 --- a/.merlin +++ /dev/null @@ -1,8 +0,0 @@ -PKG logs syslog-message ptime ptime.clock.os ipaddr -PKG x509 lwt tls tls.lwt cstruct -PKG mirage-kv-lwt mirage-console-lwt mirage-clock mirage-stack-lwt -PKG duration mirage-types-lwt mirage-types - -S src - -B _build/** \ No newline at end of file diff --git a/_tags b/_tags deleted file mode 100644 index d62ff89..0000000 --- a/_tags +++ /dev/null @@ -1,14 +0,0 @@ -true : color(always), bin_annot, safe_string, principal -true : warn(+A-4-44) -true : package(syslog-message logs ptime) -"src" : include - -: package(ptime.clock.os) - -: package(lwt) - -: package(ptime.clock.os lwt lwt.unix) -: package(ptime.clock.os lwt lwt.unix x509 tls tls.lwt cstruct) - -: package(lwt cstruct ipaddr mirage-stack-lwt mirage-console-lwt mirage-clock) -: package(lwt cstruct ipaddr mirage-stack-lwt mirage-console-lwt mirage-kv-lwt mirage-clock tls.mirage x509 tls) diff --git a/doc/api.odocl b/doc/api.odocl deleted file mode 100644 index bd1e32a..0000000 --- a/doc/api.odocl +++ /dev/null @@ -1,6 +0,0 @@ -Logs_syslog -Logs_syslog_unix -Logs_syslog_lwt -Logs_syslog_lwt_tls -Logs_syslog_mirage -Logs_syslog_mirage_tls diff --git a/dune-project b/dune-project new file mode 100644 index 0000000..b19ace3 --- /dev/null +++ b/dune-project @@ -0,0 +1,3 @@ +(lang dune 1.1) +(name logs-syslog) +(version 0.1.1) diff --git a/opam b/logs-syslog.opam similarity index 59% rename from opam rename to logs-syslog.opam index 5daaad3..65cabab 100644 --- a/opam +++ b/logs-syslog.opam @@ -9,9 +9,7 @@ license: "ISC" available: [ ocaml-version >= "4.03.0"] depends: [ - "ocamlfind" {build} - "ocamlbuild" {build} - "topkg" {build} + "dune" {>= "1.1.0" & build} "logs" "ptime" "syslog-message" {>= "0.0.2"} @@ -30,12 +28,4 @@ conflicts: [ "tls" {< "0.8.0"} ] -build: [ - [ "ocaml" "pkg/pkg.ml" "build" "--pinned" "%{pinned}%" - "--with-lwt" "%{lwt:installed}%" - "--with-lwt-tls" "%{lwt+x509+tls+cstruct:installed}%" - "--with-mirage" "%{lwt+mirage-stack-lwt+mirage-console-lwt+mirage-clock+cstruct+ipaddr:installed}%" - "--with-mirage-tls" "%{lwt+mirage-kv-lwt+x509+tls+mirage-stack-lwt+mirage-console-lwt+mirage-clock+cstruct+ipaddr:installed}%" - ] -] - +build: [ "dune" "build" "-p" name "-j" jobs ] diff --git a/pkg/META b/pkg/META deleted file mode 100644 index d11cad7..0000000 --- a/pkg/META +++ /dev/null @@ -1,63 +0,0 @@ -description = "Emit logs via syslog" -version = "%%VERSION_NUM%%" -requires = "logs syslog-message ptime" -archive(byte) = "logs-syslog.cma" -archive(native) = "logs-syslog.cmxa" -plugin(byte) = "logs-syslog.cma" -plugin(native) = "logs-syslog.cmxs" -exists_if = "logs-syslog.cma" - -package "unix" ( - description = "Unix syslog reporter" - version = "%%VERSION_NUM%%" - requires = "logs-syslog logs syslog-message ptime.clock.os unix" - archive(byte) = "logs-syslog-unix.cma" - archive(native) = "logs-syslog-unix.cmxa" - plugin(byte) = "logs-syslog-unix.cma" - plugin(native) = "logs-syslog-unix.cmxs" - exists_if = "logs-syslog-unix.cma" -) - -package "lwt" ( - description = "Lwt syslog reporter" - version = "%%VERSION_NUM%%" - requires = "logs-syslog logs syslog-message ptime.clock.os lwt lwt.unix" - archive(byte) = "logs-syslog-lwt.cma" - archive(native) = "logs-syslog-lwt.cmxa" - plugin(byte) = "logs-syslog-lwt.cma" - plugin(native) = "logs-syslog-lwt.cmxs" - exists_if = "logs-syslog-lwt.cma" - - package "tls" ( - description = "Lwt TLS syslog reporter" - version = "%%VERSION_NUM%%" - requires = "logs-syslog logs-syslog.lwt logs syslog-message ptime.clock.os lwt lwt.unix x509 tls tls.lwt cstruct" - archive(byte) = "logs-syslog-lwt-tls.cma" - archive(native) = "logs-syslog-lwt-tls.cmxa" - plugin(byte) = "logs-syslog-lwt-tls.cma" - plugin(native) = "logs-syslog-lwt-tls.cmxs" - exists_if = "logs-syslog-lwt-tls.cma" - ) -) - -package "mirage" ( - description = "Mirage syslog reporter" - version = "%%VERSION_NUM%%" - requires = "logs-syslog logs syslog-message ipaddr lwt mirage-console-lwt mirage-clock mirage-stack-lwt cstruct" - archive(byte) = "logs-syslog-mirage.cma" - archive(native) = "logs-syslog-mirage.cmxa" - plugin(byte) = "logs-syslog-mirage.cma" - plugin(native) = "logs-syslog-mirage.cmxs" - exists_if = "logs-syslog-mirage.cma" - - package "tls" ( - description = "Mirage TLS syslog reporter" - version = "%%VERSION_NUM%%" - requires = "logs-syslog logs-syslog.mirage x509 tls tls.mirage mirage-kv-lwt" - archive(byte) = "logs-syslog-mirage-tls.cma" - archive(native) = "logs-syslog-mirage-tls.cmxa" - plugin(byte) = "logs-syslog-mirage-tls.cma" - plugin(native) = "logs-syslog-mirage-tls.cmxs" - exists_if = "logs-syslog-mirage-tls.cma" - ) -) diff --git a/pkg/pkg.ml b/pkg/pkg.ml deleted file mode 100644 index 324bd75..0000000 --- a/pkg/pkg.ml +++ /dev/null @@ -1,25 +0,0 @@ -#!/usr/bin/env ocaml -#use "topfind" -#require "topkg" -open Topkg - -let lwt = Conf.with_pkg ~default:false "lwt" -let mirage = Conf.with_pkg ~default:false "mirage" -let lwt_tls = Conf.with_pkg ~default:false "lwt-tls" -let mirage_tls = Conf.with_pkg ~default:false "mirage-tls" - -let () = - Pkg.describe "logs-syslog" @@ fun c -> - let lwt = Conf.value c lwt - and mirage = Conf.value c mirage - and lwt_tls = Conf.value c lwt_tls - and mirage_tls = Conf.value c mirage_tls - in - Ok [ - Pkg.mllib "src/logs-syslog.mllib" ; - Pkg.mllib "src/logs-syslog-unix.mllib" ; - Pkg.mllib ~api:["Logs_syslog_lwt"] ~cond:lwt "src/logs-syslog-lwt.mllib" ; - Pkg.mllib ~api:["Logs_syslog_lwt_tls"] ~cond:lwt_tls "src/logs-syslog-lwt-tls.mllib" ; - Pkg.mllib ~api:["Logs_syslog_mirage"] ~cond:mirage "src/logs-syslog-mirage.mllib" ; - Pkg.mllib ~api:["Logs_syslog_mirage_tls"] ~cond:mirage_tls "src/logs-syslog-mirage-tls.mllib" ; - ] diff --git a/src/dune b/src/dune new file mode 100644 index 0000000..46a89cb --- /dev/null +++ b/src/dune @@ -0,0 +1,55 @@ +(env + (_ (flags -w +A-4-44 -safe-string -principal))) + +(library + (name logs_syslog) + (public_name logs-syslog) + (synopsis "Emit logs via syslog") + (libraries logs syslog-message ptime) + (modules logs_syslog)) + +(library + (name logs_syslog_unix) + (public_name logs-syslog.unix) + (synopsis "Unix syslog reporter") + (libraries logs-syslog ptime.clock.os unix) + (modules logs_syslog_unix)) + +(library + (name logs_syslog_lwt_common) + (public_name logs-syslog.lwt.common) + (libraries logs-syslog lwt) + (optional) + (modules logs_syslog_lwt_common)) + +(library + (name logs_syslog_lwt) + (public_name logs-syslog.lwt) + (synopsis "Lwt syslog reporter") + (libraries logs-syslog logs-syslog.lwt.common ptime.clock.os lwt lwt.unix) + (optional) + (modules logs_syslog_lwt)) + +(library + (name logs_syslog_lwt_tls) + (public_name logs-syslog.lwt.tls) + (synopsis "Lwt TLS syslog reporter") + (libraries logs-syslog.lwt x509 tls tls.lwt cstruct) + (optional) + (modules logs_syslog_lwt_tls)) + +(library + (name logs_syslog_mirage) + (public_name logs-syslog.mirage) + (synopsis "Mirage syslog reporter") + (libraries logs-syslog.lwt.common ipaddr lwt mirage-console-lwt mirage-clock mirage-stack-lwt cstruct) + (optional) + (modules logs_syslog_mirage)) + +(library + (name logs_syslog_mirage_tls) + (public_name logs-syslog.mirage.tls) + (synopsis "Mirage TLS syslog reporter") + (libraries logs-syslog.mirage x509 tls tls.mirage mirage-kv-lwt) + (optional) + (modules logs_syslog_mirage_tls)) diff --git a/src/logs-syslog-lwt-tls.mllib b/src/logs-syslog-lwt-tls.mllib deleted file mode 100644 index 60f62c2..0000000 --- a/src/logs-syslog-lwt-tls.mllib +++ /dev/null @@ -1 +0,0 @@ -Logs_syslog_lwt_tls diff --git a/src/logs-syslog-lwt.mllib b/src/logs-syslog-lwt.mllib deleted file mode 100644 index 79abf96..0000000 --- a/src/logs-syslog-lwt.mllib +++ /dev/null @@ -1,2 +0,0 @@ -Logs_syslog_lwt_common -Logs_syslog_lwt diff --git a/src/logs-syslog-mirage-tls.mllib b/src/logs-syslog-mirage-tls.mllib deleted file mode 100644 index 111b047..0000000 --- a/src/logs-syslog-mirage-tls.mllib +++ /dev/null @@ -1 +0,0 @@ -Logs_syslog_mirage_tls diff --git a/src/logs-syslog-mirage.mllib b/src/logs-syslog-mirage.mllib deleted file mode 100644 index a74dd84..0000000 --- a/src/logs-syslog-mirage.mllib +++ /dev/null @@ -1,2 +0,0 @@ -Logs_syslog_lwt_common -Logs_syslog_mirage diff --git a/src/logs-syslog-unix.mllib b/src/logs-syslog-unix.mllib deleted file mode 100644 index 3dbe9af..0000000 --- a/src/logs-syslog-unix.mllib +++ /dev/null @@ -1 +0,0 @@ -Logs_syslog_unix diff --git a/src/logs-syslog.mllib b/src/logs-syslog.mllib deleted file mode 100644 index 540f2d2..0000000 --- a/src/logs-syslog.mllib +++ /dev/null @@ -1 +0,0 @@ -Logs_syslog From c2f3b2049fedc49decc0b8f7236e04caab5a085e Mon Sep 17 00:00:00 2001 From: David Allsopp Date: Fri, 17 Aug 2018 11:38:34 +0100 Subject: [PATCH 3/4] Remove version from dune-project --- dune-project | 1 - 1 file changed, 1 deletion(-) diff --git a/dune-project b/dune-project index b19ace3..bac84d8 100644 --- a/dune-project +++ b/dune-project @@ -1,3 +1,2 @@ (lang dune 1.1) (name logs-syslog) -(version 0.1.1) From 2def2ae15cc1bead36f44e55e60f67d19b9e1e55 Mon Sep 17 00:00:00 2001 From: David Allsopp Date: Fri, 17 Aug 2018 13:13:52 +0100 Subject: [PATCH 4/4] Eliminate logs-syslog.lwt.common package --- .gitignore | 2 +- src/dune | 39 ------------------- src/lwt-tls/dune | 6 +++ src/{ => lwt-tls}/logs_syslog_lwt_tls.ml | 2 +- src/{ => lwt-tls}/logs_syslog_lwt_tls.mli | 0 src/lwt/dune | 9 +++++ src/{ => lwt}/logs_syslog_lwt.ml | 0 src/{ => lwt}/logs_syslog_lwt.mli | 0 src/mirage-tls/dune | 6 +++ .../logs_syslog_mirage_tls.ml | 2 +- .../logs_syslog_mirage_tls.mli | 0 src/mirage/dune | 9 +++++ src/{ => mirage}/logs_syslog_mirage.ml | 0 src/{ => mirage}/logs_syslog_mirage.mli | 0 14 files changed, 33 insertions(+), 42 deletions(-) create mode 100644 src/lwt-tls/dune rename src/{ => lwt-tls}/logs_syslog_lwt_tls.ml (98%) rename src/{ => lwt-tls}/logs_syslog_lwt_tls.mli (100%) create mode 100644 src/lwt/dune rename src/{ => lwt}/logs_syslog_lwt.ml (100%) rename src/{ => lwt}/logs_syslog_lwt.mli (100%) create mode 100644 src/mirage-tls/dune rename src/{ => mirage-tls}/logs_syslog_mirage_tls.ml (97%) rename src/{ => mirage-tls}/logs_syslog_mirage_tls.mli (100%) create mode 100644 src/mirage/dune rename src/{ => mirage}/logs_syslog_mirage.ml (100%) rename src/{ => mirage}/logs_syslog_mirage.mli (100%) diff --git a/.gitignore b/.gitignore index c881242..b3068de 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,6 @@ _build/ logs-syslog.install -src/.merlin +src/**/.merlin example/mirage-unikernel-*.opam example/.mirage.config diff --git a/src/dune b/src/dune index 46a89cb..489eee2 100644 --- a/src/dune +++ b/src/dune @@ -14,42 +14,3 @@ (synopsis "Unix syslog reporter") (libraries logs-syslog ptime.clock.os unix) (modules logs_syslog_unix)) - -(library - (name logs_syslog_lwt_common) - (public_name logs-syslog.lwt.common) - (libraries logs-syslog lwt) - (optional) - (modules logs_syslog_lwt_common)) - -(library - (name logs_syslog_lwt) - (public_name logs-syslog.lwt) - (synopsis "Lwt syslog reporter") - (libraries logs-syslog logs-syslog.lwt.common ptime.clock.os lwt lwt.unix) - (optional) - (modules logs_syslog_lwt)) - -(library - (name logs_syslog_lwt_tls) - (public_name logs-syslog.lwt.tls) - (synopsis "Lwt TLS syslog reporter") - (libraries logs-syslog.lwt x509 tls tls.lwt cstruct) - (optional) - (modules logs_syslog_lwt_tls)) - -(library - (name logs_syslog_mirage) - (public_name logs-syslog.mirage) - (synopsis "Mirage syslog reporter") - (libraries logs-syslog.lwt.common ipaddr lwt mirage-console-lwt mirage-clock mirage-stack-lwt cstruct) - (optional) - (modules logs_syslog_mirage)) - -(library - (name logs_syslog_mirage_tls) - (public_name logs-syslog.mirage.tls) - (synopsis "Mirage TLS syslog reporter") - (libraries logs-syslog.mirage x509 tls tls.mirage mirage-kv-lwt) - (optional) - (modules logs_syslog_mirage_tls)) diff --git a/src/lwt-tls/dune b/src/lwt-tls/dune new file mode 100644 index 0000000..ad33c8a --- /dev/null +++ b/src/lwt-tls/dune @@ -0,0 +1,6 @@ +(library + (name logs_syslog_lwt_tls) + (public_name logs-syslog.lwt.tls) + (synopsis "Lwt TLS syslog reporter") + (libraries logs-syslog.lwt x509 tls tls.lwt cstruct) + (optional)) diff --git a/src/logs_syslog_lwt_tls.ml b/src/lwt-tls/logs_syslog_lwt_tls.ml similarity index 98% rename from src/logs_syslog_lwt_tls.ml rename to src/lwt-tls/logs_syslog_lwt_tls.ml index 71980a1..471d91e 100644 --- a/src/logs_syslog_lwt_tls.ml +++ b/src/lwt-tls/logs_syslog_lwt_tls.ml @@ -1,5 +1,5 @@ open Lwt.Infix -open Logs_syslog_lwt_common +open Logs_syslog_lwt__Logs_syslog_lwt_common open Logs_syslog let tcp_tls_reporter diff --git a/src/logs_syslog_lwt_tls.mli b/src/lwt-tls/logs_syslog_lwt_tls.mli similarity index 100% rename from src/logs_syslog_lwt_tls.mli rename to src/lwt-tls/logs_syslog_lwt_tls.mli diff --git a/src/lwt/dune b/src/lwt/dune new file mode 100644 index 0000000..849777a --- /dev/null +++ b/src/lwt/dune @@ -0,0 +1,9 @@ +(library + (name logs_syslog_lwt) + (public_name logs-syslog.lwt) + (synopsis "Lwt syslog reporter") + (libraries logs-syslog ptime.clock.os lwt lwt.unix) + (optional)) + +(rule (copy ../logs_syslog_lwt_common.mli logs_syslog_lwt_common.mli)) +(rule (copy ../logs_syslog_lwt_common.ml logs_syslog_lwt_common.ml)) diff --git a/src/logs_syslog_lwt.ml b/src/lwt/logs_syslog_lwt.ml similarity index 100% rename from src/logs_syslog_lwt.ml rename to src/lwt/logs_syslog_lwt.ml diff --git a/src/logs_syslog_lwt.mli b/src/lwt/logs_syslog_lwt.mli similarity index 100% rename from src/logs_syslog_lwt.mli rename to src/lwt/logs_syslog_lwt.mli diff --git a/src/mirage-tls/dune b/src/mirage-tls/dune new file mode 100644 index 0000000..f76893b --- /dev/null +++ b/src/mirage-tls/dune @@ -0,0 +1,6 @@ +(library + (name logs_syslog_mirage_tls) + (public_name logs-syslog.mirage.tls) + (synopsis "Mirage TLS syslog reporter") + (libraries logs-syslog.mirage x509 tls tls.mirage mirage-kv-lwt) + (optional)) diff --git a/src/logs_syslog_mirage_tls.ml b/src/mirage-tls/logs_syslog_mirage_tls.ml similarity index 97% rename from src/logs_syslog_mirage_tls.ml rename to src/mirage-tls/logs_syslog_mirage_tls.ml index 36ed356..21cc334 100644 --- a/src/logs_syslog_mirage_tls.ml +++ b/src/mirage-tls/logs_syslog_mirage_tls.ml @@ -60,7 +60,7 @@ module Tls (C : Mirage_console_lwt.S) (CLOCK : Mirage_clock.PCLOCK) (STACK : Mir in connect () >|= function | Ok () -> - Ok (Logs_syslog_lwt_common.syslog_report_common + Ok (Logs_syslog_mirage__Logs_syslog_lwt_common.syslog_report_common facility hostname truncate diff --git a/src/logs_syslog_mirage_tls.mli b/src/mirage-tls/logs_syslog_mirage_tls.mli similarity index 100% rename from src/logs_syslog_mirage_tls.mli rename to src/mirage-tls/logs_syslog_mirage_tls.mli diff --git a/src/mirage/dune b/src/mirage/dune new file mode 100644 index 0000000..eca720f --- /dev/null +++ b/src/mirage/dune @@ -0,0 +1,9 @@ +(library + (name logs_syslog_mirage) + (public_name logs-syslog.mirage) + (synopsis "Mirage syslog reporter") + (libraries logs-syslog ipaddr lwt mirage-console-lwt mirage-clock mirage-stack-lwt cstruct) + (optional)) + +(rule (copy ../logs_syslog_lwt_common.mli logs_syslog_lwt_common.mli)) +(rule (copy ../logs_syslog_lwt_common.ml logs_syslog_lwt_common.ml)) diff --git a/src/logs_syslog_mirage.ml b/src/mirage/logs_syslog_mirage.ml similarity index 100% rename from src/logs_syslog_mirage.ml rename to src/mirage/logs_syslog_mirage.ml diff --git a/src/logs_syslog_mirage.mli b/src/mirage/logs_syslog_mirage.mli similarity index 100% rename from src/logs_syslog_mirage.mli rename to src/mirage/logs_syslog_mirage.mli