From a5dfb749931d1bead823c294fac105c16ea56f89 Mon Sep 17 00:00:00 2001 From: Ivor Paul Date: Tue, 1 Oct 2024 12:12:26 +0200 Subject: [PATCH] Update test to require less code changes. --- config/config.exs | 2 +- test/tesla/middleware/meta_logger_test.exs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/config/config.exs b/config/config.exs index 91e6b3b..68a81ab 100644 --- a/config/config.exs +++ b/config/config.exs @@ -1,3 +1,3 @@ import Config -config :logger, :default_formatter, metadata: ~w(bar baz foo request_id)a +config :logger, :default_formatter, metadata: ~w(bar baz foo)a diff --git a/test/tesla/middleware/meta_logger_test.exs b/test/tesla/middleware/meta_logger_test.exs index 884087a..33d9938 100644 --- a/test/tesla/middleware/meta_logger_test.exs +++ b/test/tesla/middleware/meta_logger_test.exs @@ -230,7 +230,7 @@ defmodule Tesla.Middleware.MetaLoggerTest do end test "when the max entry length is given and the logs are split, the metadata is captured with each line" do - Logger.metadata(request_id: "123123123") + Logger.metadata(foo: "123123123") body = String.duplicate("x", 100) @@ -242,7 +242,7 @@ defmodule Tesla.Middleware.MetaLoggerTest do log_lines |> Enum.each(fn log_line -> - assert log_line =~ "request_id=123123123" + assert log_line =~ "foo=123123123" end) end