aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAdelyn Breelove <[email protected]>2019-01-21 09:54:34 -0700
committerAdelyn Breelove <[email protected]>2019-01-21 09:54:34 -0700
commit7d254ed478a014afff83fa291e5568b3596dfce0 (patch)
tree4b1d0f39bd30f71efe7e4a3072880afc68df2989 /lib
parentfinish making model signatures (diff)
downloaddisml-7d254ed478a014afff83fa291e5568b3596dfce0.tar.xz
disml-7d254ed478a014afff83fa291e5568b3596dfce0.zip
start using Logs
Diffstat (limited to 'lib')
-rw-r--r--lib/dune2
-rw-r--r--lib/event.ml2
-rw-r--r--lib/sharder.ml2
3 files changed, 3 insertions, 3 deletions
diff --git a/lib/dune b/lib/dune
index f3888e0..a5a2e6e 100644
--- a/lib/dune
+++ b/lib/dune
@@ -19,7 +19,7 @@
user user_t
client client_options dispatch endpoints event http opcode rl sharder
)
- (libraries core async_ssl cohttp-async yojson websocket-async zlib ppx_deriving_yojson.runtime)
+ (libraries core async_ssl cohttp-async logs yojson websocket-async zlib ppx_deriving_yojson.runtime)
(preprocess (pps ppx_jane ppx_deriving_yojson))
)
diff --git a/lib/event.ml b/lib/event.ml
index 7f843d7..9b12792 100644
--- a/lib/event.ml
+++ b/lib/event.ml
@@ -120,4 +120,4 @@ let handle_event ~ev contents =
try
event_of_yojson ~contents ev
|> dispatch
- with Invalid_event ev -> Printf.printf "Unknown event: %s\n%!" ev \ No newline at end of file
+ with Invalid_event ev -> Logs.debug (fun m -> m "Unknown event: %s" ev); \ No newline at end of file
diff --git a/lib/sharder.ml b/lib/sharder.ml
index 9ad0022..f03c7dd 100644
--- a/lib/sharder.ml
+++ b/lib/sharder.ml
@@ -33,7 +33,7 @@ module Shard = struct
| `Eof -> None
let push_frame ?payload ~ev shard =
- print_endline @@ "Pushing frame. OP: " ^ Opcode.to_string @@ ev;
+ Logs.debug (fun m -> m "Pushing frame with Opcode: %s" (Opcode.to_string ev));
let content = match payload with
| None -> ""
| Some p ->