From e2c4e17655a2a4c22dab186c694792fd8e723ddd Mon Sep 17 00:00:00 2001 From: Romain Beauxis Date: Tue, 27 Jun 2023 15:45:24 -0500 Subject: [PATCH] Log backtraces on two more errors. Refs: #3156 --- src/core/outputs/icecast2.ml | 8 +++++--- src/core/sources/harbor_input.ml | 6 ++++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/core/outputs/icecast2.ml b/src/core/outputs/icecast2.ml index d59216f6c6..c602adcccb 100644 --- a/src/core/outputs/icecast2.ml +++ b/src/core/outputs/icecast2.ml @@ -502,9 +502,11 @@ class output p = ~charset:(Charset.to_string out_enc) connection icy_meta with e -> - self#log#important - "Metadata update may have failed with error: %s" - (Printexc.to_string e)) + let bt = Printexc.get_backtrace () in + Utils.log_exception ~log:self#log ~bt + (Printf.sprintf + "Metadata update may have failed with error: %s" + (Printexc.to_string e))) | Cry.Disconnected -> ()) else ( (* Encoder is not always present.. *) diff --git a/src/core/sources/harbor_input.ml b/src/core/sources/harbor_input.ml index 4c9b9c95c3..613f2eb044 100644 --- a/src/core/sources/harbor_input.ml +++ b/src/core/sources/harbor_input.ml @@ -105,8 +105,10 @@ class http_input_server ~pos ~transport ~dumpfile ~logfile ~bufferize ~max ~icy in f () with e -> - self#log#severe "Error while reading from client: %s" - (Printexc.to_string e); + let bt = Printexc.get_backtrace () in + Utils.log_exception ~log:self#log ~bt + (Printf.sprintf "Error while reading from client: %s" + (Printexc.to_string e)); self#disconnect ~lock:false; 0)) buf len