From a50224932bc54cbf3015bacf3dd33100455e0802 Mon Sep 17 00:00:00 2001 From: Ivor Paul Date: Sat, 28 Sep 2024 12:33:40 +0200 Subject: [PATCH] Add debugging logging of metadata --- lib/tesla/middleware/meta_logger.ex | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/tesla/middleware/meta_logger.ex b/lib/tesla/middleware/meta_logger.ex index e4b7762..b2bf1b1 100644 --- a/lib/tesla/middleware/meta_logger.ex +++ b/lib/tesla/middleware/meta_logger.ex @@ -185,6 +185,8 @@ if Code.ensure_loaded?(Tesla) do metadata = MetaLogger.metadata() max_entry_length = Keyword.get(options, :max_entry_length) + MetaLogger.log(level, "These are the metadata from callers.", metadata) + message |> Slicer.slice(max_entry_length) |> Enum.map(&prepend_tag(&1, options))