diff options
| author | John Estabrook <jestabro@vyos.io> | 2025-09-10 14:53:56 -0500 |
|---|---|---|
| committer | John Estabrook <jestabro@vyos.io> | 2025-09-10 15:03:03 -0500 |
| commit | c083f15e141315d8e4142d93997737b72d3e648d (patch) | |
| tree | 091ec10891a40017f9d01c3d84b69053381d2a8c /src | |
| parent | 4a10cd92e8e5d3f7bf53c1a80c408c68073535c8 (diff) | |
| download | vyconf-c083f15e141315d8e4142d93997737b72d3e648d.tar.gz vyconf-c083f15e141315d8e4142d93997737b72d3e648d.zip | |
T7737: drop message debug logging for now
Diffstat (limited to 'src')
| -rw-r--r-- | src/message.ml | 4 | ||||
| -rw-r--r-- | src/message.mli | 2 |
2 files changed, 2 insertions, 4 deletions
diff --git a/src/message.ml b/src/message.ml index d4cc374..5b508eb 100644 --- a/src/message.ml +++ b/src/message.ml @@ -13,18 +13,14 @@ let read ic = let header = Bytes.create 4 in let%lwt () = Lwt_io.read_into_exactly ic header 0 4 in let length = EndianBytes.BigEndian.get_int32 header 0 |> Int32.to_int in - Lwt_log.debug (Printf.sprintf "Read length: %d\n" length) |> Lwt.ignore_result; if length < 0 then failwith (Printf.sprintf "Bad message length: %d" length) else let buffer = Bytes.create length in let%lwt () = Lwt_io.read_into_exactly ic buffer 0 length in - Lwt_log.debug (hexdump buffer |> Printf.sprintf "Read mesage: %s") |> Lwt.ignore_result; Lwt.return buffer let write oc msg = let length = Bytes.length msg in let length' = Int32.of_int length in - Lwt_log.debug (Printf.sprintf "Write length: %d\n" length) |> Lwt.ignore_result; - Lwt_log.debug (hexdump msg |> Printf.sprintf "Write message: %s") |> Lwt.ignore_result; if length' < 0l then failwith (Printf.sprintf "Bad message length: %d" length) else let header = Bytes.create 4 in let () = EndianBytes.BigEndian.set_int32 header 0 length' in diff --git a/src/message.mli b/src/message.mli index ec44c56..2d5baa7 100644 --- a/src/message.mli +++ b/src/message.mli @@ -1,3 +1,5 @@ val read : Lwt_io.input_channel -> bytes Lwt.t val write : Lwt_io.output_channel -> bytes -> unit Lwt.t + +val hexdump : bytes -> string |
