From 725bd6dfa562aa44ea5968d02c6123e1c22c7835 Mon Sep 17 00:00:00 2001 From: Jake Morrison Date: Sat, 10 Aug 2024 19:44:12 -0500 Subject: [PATCH] steamroll --- src/logger_formatter_json.erl | 1 + test/logger_formatter_json_SUITE.erl | 243 ++++++++++++++++++++++++++- 2 files changed, 237 insertions(+), 7 deletions(-) diff --git a/src/logger_formatter_json.erl b/src/logger_formatter_json.erl index 1337f21..a166358 100644 --- a/src/logger_formatter_json.erl +++ b/src/logger_formatter_json.erl @@ -149,6 +149,7 @@ to_output(_Key, Value, Config) when is_map(Value) -> to_output(Key, Value, Config) -> iolist_to_binary(to_string(Key, Value, Config)). + to_string({level, OutputFormat}, Value, Config) -> format_level(OutputFormat, Value, Config); to_string(system_time, Value, Config) -> format_time(Value, Config); % to_string({system_time, OutputFormat},Value,Config) -> diff --git a/test/logger_formatter_json_SUITE.erl b/test/logger_formatter_json_SUITE.erl index 1360a5d..e3e6c26 100644 --- a/test/logger_formatter_json_SUITE.erl +++ b/test/logger_formatter_json_SUITE.erl @@ -257,14 +257,43 @@ unstructured(_) -> ) ), ?assertEqual( - <<"{\"msg\":\"<0.4184.0> running ExampleWeb.Endpoint (connection <0.4173.0>, stream id 2) terminated\\nServer: app.example.com:80 (http)\\nRequest: GET /dash/listings/44\\n** (exit) an exception was raised:\\n ** (KeyError) key :prod_identifier not found in: %{\\n id: \\\"gid://shopify/ProductVariant/42739636764833\\\",\\n description: \\\"Example\\\",\\n title: \\\"MLS Only SB\\\",\\n identifier: \\\"mls_only_7.21\\\",\\n order: 2,\\n subtitle: \\\"Default Title\\\",\\n price: 99,\\n sku: \\\"mls_only_7.21\\\",\\n product_image_src: \\\"https://cdn.shopify.com/s/files/1/0584/4444/7905/products/Group1600mlsonly.png?v=1669771810\\\"\\n}\\n (homepie 0.1.0) lib/homepie_web/controllers/dash_controller.ex:58: anonymous fn/2 in ExampleWeb.DashController.admin_listing_page/2\\n (elixir 1.17.2) lib/enum.ex:4301: Enum.filter_list/2\\n (homepie 0.1.0) lib/homepie_web/controllers/dash_controller.ex:58: ExampleWeb.DashController.admin_listing_page/2\\n (homepie 0.1.0) lib/homepie_web/controllers/dash_controller.ex:1: ExampleWeb.DashController.action/2\\n (homepie 0.1.0) lib/homepie_web/controllers/dash_controller.ex:1: ExampleWeb.DashController.phoenix_controller_pipeline/2\\n (phoenix 1.7.14) lib/phoenix/router.ex:484: Phoenix.Router.__call__/5\\n (homepie 0.1.0) deps/plug/lib/plug/error_handler.ex:80: ExampleWeb.Router.call/2\\n (homepie 0.1.0) lib/homepie_web/endpoint.ex:1: ExampleWeb.Endpoint.plug_builder_call/2\",\"level\":\"info\"}\n">>, + << + "{\"msg\":\"<0.4184.0> running ExampleWeb.Endpoint (connection <0.4173.0>, stream id 2) terminated\\nServer: app.example.com:80 (http)\\nRequest: GET /dash/listings/44\\n** (exit) an exception was raised:\\n ** (KeyError) key :prod_identifier not found in: %{\\n id: \\\"gid://shopify/ProductVariant/42739636764833\\\",\\n description: \\\"Example\\\",\\n title: \\\"MLS Only SB\\\",\\n identifier: \\\"mls_only_7.21\\\",\\n order: 2,\\n subtitle: \\\"Default Title\\\",\\n price: 99,\\n sku: \\\"mls_only_7.21\\\",\\n product_image_src: \\\"https://cdn.shopify.com/s/files/1/0584/4444/7905/products/Group1600mlsonly.png?v=1669771810\\\"\\n}\\n (homepie 0.1.0) lib/homepie_web/controllers/dash_controller.ex:58: anonymous fn/2 in ExampleWeb.DashController.admin_listing_page/2\\n (elixir 1.17.2) lib/enum.ex:4301: Enum.filter_list/2\\n (homepie 0.1.0) lib/homepie_web/controllers/dash_controller.ex:58: ExampleWeb.DashController.admin_listing_page/2\\n (homepie 0.1.0) lib/homepie_web/controllers/dash_controller.ex:1: ExampleWeb.DashController.action/2\\n (homepie 0.1.0) lib/homepie_web/controllers/dash_controller.ex:1: ExampleWeb.DashController.phoenix_controller_pipeline/2\\n (phoenix 1.7.14) lib/phoenix/router.ex:484: Phoenix.Router.__call__/5\\n (homepie 0.1.0) deps/plug/lib/plug/error_handler.ex:80: ExampleWeb.Router.call/2\\n (homepie 0.1.0) lib/homepie_web/endpoint.ex:1: ExampleWeb.Endpoint.plug_builder_call/2\",\"level\":\"info\"}\n" + >>, iolist_to_binary( logger_formatter_json:format( #{ level => info, msg => -{string,[c:pid(0,4184,0),<<" running ">>,<<"ExampleWeb.Endpoint">>,[<<" (connection ">>,c:pid(0,4173,0),<<", stream id ">>,<<"2">>,41],<<" terminated\n">>,[[<<"Server: ">>,<<"app.example.com">>,<<":">>,<<"80">>,32,40,<<"http">>,41,10],[<<"Request: ">>,<<"GET">>,32,<<"/dash/listings/44">>,10]]|<<"** (exit) an exception was raised:\n ** (KeyError) key :prod_identifier not found in: %{\n id: \"gid://shopify/ProductVariant/42739636764833\",\n description: \"Example\",\n title: \"MLS Only SB\",\n identifier: \"mls_only_7.21\",\n order: 2,\n subtitle: \"Default Title\",\n price: 99,\n sku: \"mls_only_7.21\",\n product_image_src: \"https://cdn.shopify.com/s/files/1/0584/4444/7905/products/Group1600mlsonly.png?v=1669771810\"\n}\n (homepie 0.1.0) lib/homepie_web/controllers/dash_controller.ex:58: anonymous fn/2 in ExampleWeb.DashController.admin_listing_page/2\n (elixir 1.17.2) lib/enum.ex:4301: Enum.filter_list/2\n (homepie 0.1.0) lib/homepie_web/controllers/dash_controller.ex:58: ExampleWeb.DashController.admin_listing_page/2\n (homepie 0.1.0) lib/homepie_web/controllers/dash_controller.ex:1: ExampleWeb.DashController.action/2\n (homepie 0.1.0) lib/homepie_web/controllers/dash_controller.ex:1: ExampleWeb.DashController.phoenix_controller_pipeline/2\n (phoenix 1.7.14) lib/phoenix/router.ex:484: Phoenix.Router.__call__/5\n (homepie 0.1.0) deps/plug/lib/plug/error_handler.ex:80: ExampleWeb.Router.call/2\n (homepie 0.1.0) lib/homepie_web/endpoint.ex:1: ExampleWeb.Endpoint.plug_builder_call/2">>]}, + { + string, + [ + c:pid(0, 4184, 0), + <<" running ">>, + <<"ExampleWeb.Endpoint">>, + [<<" (connection ">>, c:pid(0, 4173, 0), <<", stream id ">>, <<"2">>, 41], + <<" terminated\n">>, + [ + [ + <<"Server: ">>, + <<"app.example.com">>, + <<":">>, + <<"80">>, + 32, + 40, + <<"http">>, + 41, + 10 + ], + [<<"Request: ">>, <<"GET">>, 32, <<"/dash/listings/44">>, 10] + ] + | + << + "** (exit) an exception was raised:\n ** (KeyError) key :prod_identifier not found in: %{\n id: \"gid://shopify/ProductVariant/42739636764833\",\n description: \"Example\",\n title: \"MLS Only SB\",\n identifier: \"mls_only_7.21\",\n order: 2,\n subtitle: \"Default Title\",\n price: 99,\n sku: \"mls_only_7.21\",\n product_image_src: \"https://cdn.shopify.com/s/files/1/0584/4444/7905/products/Group1600mlsonly.png?v=1669771810\"\n}\n (homepie 0.1.0) lib/homepie_web/controllers/dash_controller.ex:58: anonymous fn/2 in ExampleWeb.DashController.admin_listing_page/2\n (elixir 1.17.2) lib/enum.ex:4301: Enum.filter_list/2\n (homepie 0.1.0) lib/homepie_web/controllers/dash_controller.ex:58: ExampleWeb.DashController.admin_listing_page/2\n (homepie 0.1.0) lib/homepie_web/controllers/dash_controller.ex:1: ExampleWeb.DashController.action/2\n (homepie 0.1.0) lib/homepie_web/controllers/dash_controller.ex:1: ExampleWeb.DashController.phoenix_controller_pipeline/2\n (phoenix 1.7.14) lib/phoenix/router.ex:484: Phoenix.Router.__call__/5\n (homepie 0.1.0) deps/plug/lib/plug/error_handler.ex:80: ExampleWeb.Router.call/2\n (homepie 0.1.0) lib/homepie_web/endpoint.ex:1: ExampleWeb.Endpoint.plug_builder_call/2" + >> + ] + }, meta => #{} }, Config @@ -298,7 +327,9 @@ structured(_) -> ) ), ?assertEqual( - <<"{\"msg\":{\"args\":\"10.10.2.182\",\"format\":\"** System NOT running to use fully qualified hostnames **~n** Hostname ~ts is illegal **~n\",\"label\":\"{error_logger,error_msg}\"},\"level\":\"info\"}\n">>, + << + "{\"msg\":{\"args\":\"10.10.2.182\",\"format\":\"** System NOT running to use fully qualified hostnames **~n** Hostname ~ts is illegal **~n\",\"label\":\"{error_logger,error_msg}\"},\"level\":\"info\"}\n" + >>, iolist_to_binary( logger_formatter_json:format( #{ @@ -363,11 +394,209 @@ structured(_) -> metadata(_) -> - Config = #{template => [msg, level, conn,crash_reason,domain,error_logger,gl,otel_span_id, - otel_trace_flags,otel_trace_id,pid,time,xray_trace_id]}, - Meta = #{error_logger => #{tag => error},pid => c:pid(0, 672, 0),time => 1723325773127320,gl => c:pid(0, 394, 0),domain => [cowboy],otel_trace_id => "66b7dd4d7dad9f9aba84fb43389b4611",otel_span_id => "052d4929d398aec6",xray_trace_id => <<"1-66b7dd4d-dad9f9aba84fb43389b4611@052d4929d398aec6">>,otel_trace_flags => "01",crash_reason => {#{message => <<"bad argument in arithmetic expression">>,'__struct__' => 'Elixir.ArithmeticError','__exception__' => true},[{erlang,'+',[1,a],[{error_info,#{module => erl_erts_errors}}]},{'Elixir.PhoenixContainerExampleWeb.PageController',home,2,[{file,"lib/phoenix_container_example_web/controllers/page_controller.ex"},{line,8}]},{'Elixir.PhoenixContainerExampleWeb.PageController',action,2,[{file,"lib/phoenix_container_example_web/controllers/page_controller.ex"},{line,1}]},{'Elixir.PhoenixContainerExampleWeb.PageController',phoenix_controller_pipeline,2,[{file,"lib/phoenix_container_example_web/controllers/page_controller.ex"},{line,1}]},{'Elixir.Phoenix.Router','__call__',5,[{file,"lib/phoenix/router.ex"},{line,484}]},{'Elixir.PhoenixContainerExampleWeb.Endpoint',plug_builder_call,2,[{file,"lib/phoenix_container_example_web/endpoint.ex"},{line,1}]},{'Elixir.PhoenixContainerExampleWeb.Endpoint','call (overridable 3)',2,[{file,"deps/plug/lib/plug/debugger.ex"},{line,136}]},{'Elixir.PhoenixContainerExampleWeb.Endpoint',call,2,[{file,"lib/phoenix_container_example_web/endpoint.ex"},{line,1}]},{'Elixir.Phoenix.Endpoint.SyncCodeReloadPlug',do_call,4,[{file,"lib/phoenix/endpoint/sync_code_reload_plug.ex"},{line,22}]},{'Elixir.Plug.Cowboy.Handler',init,2,[{file,"lib/plug/cowboy/handler.ex"},{line,11}]},{cowboy_handler,execute,2,[{file,"/Users/jake/work/phoenix_container_example/deps/cowboy/src/cowboy_handler.erl"},{line,37}]},{cowboy_stream_h,execute,3,[{file,"/Users/jake/work/phoenix_container_example/deps/cowboy/src/cowboy_stream_h.erl"},{line,306}]},{cowboy_stream_h,request_process,3,[{file,"/Users/jake/work/phoenix_container_example/deps/cowboy/src/cowboy_stream_h.erl"},{line,295}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,329}]}]},conn => #{owner => c:pid(0,673,0),port => 4000,private => #{},scheme => http,status => nil,script_name => [],state => unset,host => <<"localhost">>,params => #{'__struct__' => 'Elixir.Plug.Conn.Unfetched',aspect => params},'__struct__' => 'Elixir.Plug.Conn',halted => false,adapter => {'Elixir.Plug.Cowboy.Conn',#{pid => c:pid(0,672,0),port => 4000,scheme => <<"http">>,version => 'HTTP/1.1',path => <<"/">>,host => <<"localhost">>,peer => {{127,0,0,1},58196},bindings => #{},ref => 'Elixir.PhoenixContainerExampleWeb.Endpoint.HTTP',cert => undefined,headers => #{<<"accept">> => <<"*/*">>,<<"host">> => <<"localhost:4000">>,<<"user-agent">> => <<"curl/8.6.0">>},sock => {{127,0,0,1},4000},method => <<"GET">>,path_info => undefined,host_info => undefined,streamid => 1,body_length => 0,has_body => false,qs => <<>>}},secret_key_base => nil,cookies => #{'__struct__' => 'Elixir.Plug.Conn.Unfetched',aspect => cookies},request_path => <<"/">>,assigns => #{},method => <<"GET">>,query_string => <<>>,remote_ip => {127,0,0,1},req_headers => [{<<"accept">>,<<"*/*">>},{<<"host">>,<<"localhost:4000">>},{<<"user-agent">>,<<"curl/8.6.0">>}],path_info => [],path_params => #{},resp_headers => [{<<"cache-control">>,<<"max-age=0, private, must-revalidate">>}],resp_cookies => #{},resp_body => nil,body_params => #{'__struct__' => 'Elixir.Plug.Conn.Unfetched',aspect => body_params},query_params => #{'__struct__' => 'Elixir.Plug.Conn.Unfetched',aspect => query_params},req_cookies => #{'__struct__' => 'Elixir.Plug.Conn.Unfetched',aspect => cookies}}}, + Config = + #{ + template + => + [ + msg, + level, + conn, + crash_reason, + domain, + error_logger, + gl, + otel_span_id, + otel_trace_flags, + otel_trace_id, + pid, + time, + xray_trace_id + ] + }, + Meta = + #{ + error_logger => #{tag => error}, + pid => c:pid(0, 672, 0), + time => 1723325773127320, + gl => c:pid(0, 394, 0), + domain => [cowboy], + otel_trace_id => "66b7dd4d7dad9f9aba84fb43389b4611", + otel_span_id => "052d4929d398aec6", + xray_trace_id => <<"1-66b7dd4d-dad9f9aba84fb43389b4611@052d4929d398aec6">>, + otel_trace_flags => "01", + crash_reason + => + { + #{ + message => <<"bad argument in arithmetic expression">>, + '__struct__' => 'Elixir.ArithmeticError', + '__exception__' => true + }, + [ + {erlang, '+', [1, a], [{error_info, #{module => erl_erts_errors}}]}, + { + 'Elixir.PhoenixContainerExampleWeb.PageController', + home, + 2, + [{file, "lib/phoenix_container_example_web/controllers/page_controller.ex"}, {line, 8}] + }, + { + 'Elixir.PhoenixContainerExampleWeb.PageController', + action, + 2, + [{file, "lib/phoenix_container_example_web/controllers/page_controller.ex"}, {line, 1}] + }, + { + 'Elixir.PhoenixContainerExampleWeb.PageController', + phoenix_controller_pipeline, + 2, + [{file, "lib/phoenix_container_example_web/controllers/page_controller.ex"}, {line, 1}] + }, + {'Elixir.Phoenix.Router', '__call__', 5, [{file, "lib/phoenix/router.ex"}, {line, 484}]}, + { + 'Elixir.PhoenixContainerExampleWeb.Endpoint', + plug_builder_call, + 2, + [{file, "lib/phoenix_container_example_web/endpoint.ex"}, {line, 1}] + }, + { + 'Elixir.PhoenixContainerExampleWeb.Endpoint', + 'call (overridable 3)', + 2, + [{file, "deps/plug/lib/plug/debugger.ex"}, {line, 136}] + }, + { + 'Elixir.PhoenixContainerExampleWeb.Endpoint', + call, + 2, + [{file, "lib/phoenix_container_example_web/endpoint.ex"}, {line, 1}] + }, + { + 'Elixir.Phoenix.Endpoint.SyncCodeReloadPlug', + do_call, + 4, + [{file, "lib/phoenix/endpoint/sync_code_reload_plug.ex"}, {line, 22}] + }, + { + 'Elixir.Plug.Cowboy.Handler', + init, + 2, + [{file, "lib/plug/cowboy/handler.ex"}, {line, 11}] + }, + { + cowboy_handler, + execute, + 2, + [ + { + file, + "/Users/jake/work/phoenix_container_example/deps/cowboy/src/cowboy_handler.erl" + }, + {line, 37} + ] + }, + { + cowboy_stream_h, + execute, + 3, + [ + { + file, + "/Users/jake/work/phoenix_container_example/deps/cowboy/src/cowboy_stream_h.erl" + }, + {line, 306} + ] + }, + { + cowboy_stream_h, + request_process, + 3, + [ + { + file, + "/Users/jake/work/phoenix_container_example/deps/cowboy/src/cowboy_stream_h.erl" + }, + {line, 295} + ] + }, + {proc_lib, init_p_do_apply, 3, [{file, "proc_lib.erl"}, {line, 329}]} + ] + }, + conn + => + #{ + owner => c:pid(0, 673, 0), + port => 4000, + private => #{}, + scheme => http, + status => nil, + script_name => [], + state => unset, + host => <<"localhost">>, + params => #{'__struct__' => 'Elixir.Plug.Conn.Unfetched', aspect => params}, + '__struct__' => 'Elixir.Plug.Conn', + halted => false, + adapter + => + { + 'Elixir.Plug.Cowboy.Conn', + #{ + pid => c:pid(0, 672, 0), + port => 4000, + scheme => <<"http">>, + version => 'HTTP/1.1', + path => <<"/">>, + host => <<"localhost">>, + peer => {{127, 0, 0, 1}, 58196}, + bindings => #{}, + ref => 'Elixir.PhoenixContainerExampleWeb.Endpoint.HTTP', + cert => undefined, + headers + => + #{ + <<"accept">> => <<"*/*">>, + <<"host">> => <<"localhost:4000">>, + <<"user-agent">> => <<"curl/8.6.0">> + }, + sock => {{127, 0, 0, 1}, 4000}, + method => <<"GET">>, + path_info => undefined, + host_info => undefined, + streamid => 1, + body_length => 0, + has_body => false, + qs => <<>> + } + }, + secret_key_base => nil, + cookies => #{'__struct__' => 'Elixir.Plug.Conn.Unfetched', aspect => cookies}, + request_path => <<"/">>, + assigns => #{}, + method => <<"GET">>, + query_string => <<>>, + remote_ip => {127, 0, 0, 1}, + req_headers + => + [ + {<<"accept">>, <<"*/*">>}, + {<<"host">>, <<"localhost:4000">>}, + {<<"user-agent">>, <<"curl/8.6.0">>} + ], + path_info => [], + path_params => #{}, + resp_headers => [{<<"cache-control">>, <<"max-age=0, private, must-revalidate">>}], + resp_cookies => #{}, + resp_body => nil, + body_params => #{'__struct__' => 'Elixir.Plug.Conn.Unfetched', aspect => body_params}, + query_params => #{'__struct__' => 'Elixir.Plug.Conn.Unfetched', aspect => query_params}, + req_cookies => #{'__struct__' => 'Elixir.Plug.Conn.Unfetched', aspect => cookies} + } + }, ?assertEqual( - <<"{\"msg\":\"abc\",\"level\":\"info\",\"conn\":{\"__struct__\":\"Elixir.Plug.Conn\",\"adapter\":\"{'Elixir.Plug.Cowboy.Conn',#{pid => <0.672.0>,port => 4000,scheme => <<\\\"http\\\">>,version => 'HTTP/1.1',path => <<\\\"/\\\">>,host => <<\\\"localhost\\\">>,peer => {{127,0,0,1},58196},bindings => #{},cert => undefined,headers => #{<<\\\"accept\\\">> => <<\\\"*/*\\\">>,<<\\\"host\\\">> => <<\\\"localhost:4000\\\">>,<<\\\"user-agent\\\">> => <<\\\"curl/8.6.0\\\">>},ref => 'Elixir.PhoenixContainerExampleWeb.Endpoint.HTTP',body_length => 0,has_body => false,host_info => undefined,method => <<\\\"GET\\\">>,path_info => undefined,qs => <<>>,sock => {{127,0,0,1},4000},streamid => 1}}\",\"assigns\":[],\"body_params\":{\"__struct__\":\"Elixir.Plug.Conn.Unfetched\",\"aspect\":\"body_params\"},\"cookies\":{\"__struct__\":\"Elixir.Plug.Conn.Unfetched\",\"aspect\":\"cookies\"},\"halted\":\"false\",\"host\":\"localhost\",\"method\":\"GET\",\"owner\":\"<0.673.0>\",\"params\":{\"__struct__\":\"Elixir.Plug.Conn.Unfetched\",\"aspect\":\"params\"},\"path_info\":\"[]\",\"path_params\":[],\"port\":\"4000\",\"private\":[],\"query_params\":{\"__struct__\":\"Elixir.Plug.Conn.Unfetched\",\"aspect\":\"query_params\"},\"query_string\":\"\",\"remote_ip\":\"{127,0,0,1}\",\"req_cookies\":{\"__struct__\":\"Elixir.Plug.Conn.Unfetched\",\"aspect\":\"cookies\"},\"req_headers\":\"[{<<\\\"accept\\\">>,<<\\\"*/*\\\">>},{<<\\\"host\\\">>,<<\\\"localhost:4000\\\">>},{<<\\\"user-agent\\\">>,<<\\\"curl/8.6.0\\\">>}]\",\"request_path\":\"/\",\"resp_body\":\"nil\",\"resp_cookies\":[],\"resp_headers\":\"[{<<\\\"cache-control\\\">>,<<\\\"max-age=0, private, must-revalidate\\\">>}]\",\"scheme\":\"http\",\"script_name\":\"[]\",\"secret_key_base\":\"nil\",\"state\":\"unset\",\"status\":\"nil\"},\"crash_reason\":\"{#{message => <<\\\"bad argument in arithmetic expression\\\">>,'__struct__' => 'Elixir.ArithmeticError','__exception__' => true},[{erlang,'+',[1,a],[{error_info,#{module => erl_erts_errors}}]},{'Elixir.PhoenixContainerExampleWeb.PageController',home,2,[{file,\\\"lib/phoenix_container_example_web/controllers/page_controller.ex\\\"},{line,8}]},{'Elixir.PhoenixContainerExampleWeb.PageController',action,2,[{file,\\\"lib/phoenix_container_example_web/controllers/page_controller.ex\\\"},{line,1}]},{'Elixir.PhoenixContainerExampleWeb.PageController',phoenix_controller_pipeline,2,[{file,\\\"lib/phoenix_container_example_web/controllers/page_controller.ex\\\"},{line,1}]},{'Elixir.Phoenix.Router','__call__',5,[{file,\\\"lib/phoenix/router.ex\\\"},{line,484}]},{'Elixir.PhoenixContainerExampleWeb.Endpoint',plug_builder_call,2,[{file,\\\"lib/phoenix_container_example_web/endpoint.ex\\\"},{line,1}]},{'Elixir.PhoenixContainerExampleWeb.Endpoint','call (overridable 3)',2,[{file,\\\"deps/plug/lib/plug/debugger.ex\\\"},{line,136}]},{'Elixir.PhoenixContainerExampleWeb.Endpoint',call,2,[{file,\\\"lib/phoenix_container_example_web/endpoint.ex\\\"},{line,1}]},{'Elixir.Phoenix.Endpoint.SyncCodeReloadPlug',do_call,4,[{file,\\\"lib/phoenix/endpoint/sync_code_reload_plug.ex\\\"},{line,22}]},{'Elixir.Plug.Cowboy.Handler',init,2,[{file,\\\"lib/plug/cowboy/handler.ex\\\"},{line,11}]},{cowboy_handler,execute,2,[{file,\\\"/Users/jake/work/phoenix_container_example/deps/cowboy/src/cowboy_handler.erl\\\"},{line,37}]},{cowboy_stream_h,execute,3,[{file,\\\"/Users/jake/work/phoenix_container_example/deps/cowboy/src/cowboy_stream_h.erl\\\"},{line,306}]},{cowboy_stream_h,request_process,3,[{file,\\\"/Users/jake/work/phoenix_container_example/deps/cowboy/src/cowboy_stream_h.erl\\\"},{line,295}]},{proc_lib,init_p_do_apply,3,[{file,\\\"proc_lib.erl\\\"},{line,329}]}]}\",\"domain\":\"[cowboy]\",\"error_logger\":{\"tag\":\"error\"},\"gl\":\"<0.394.0>\",\"otel_span_id\":\"052d4929d398aec6\",\"otel_trace_flags\":\"01\",\"otel_trace_id\":\"66b7dd4d7dad9f9aba84fb43389b4611\",\"pid\":\"<0.672.0>\",\"time\":\"2024-08-10T16:36:13.127320-05:00\",\"xray_trace_id\":\"1-66b7dd4d-dad9f9aba84fb43389b4611@052d4929d398aec6\"}\n">>, + << + "{\"msg\":\"abc\",\"level\":\"info\",\"conn\":{\"__struct__\":\"Elixir.Plug.Conn\",\"adapter\":\"{'Elixir.Plug.Cowboy.Conn',#{pid => <0.672.0>,port => 4000,scheme => <<\\\"http\\\">>,version => 'HTTP/1.1',path => <<\\\"/\\\">>,host => <<\\\"localhost\\\">>,peer => {{127,0,0,1},58196},bindings => #{},cert => undefined,headers => #{<<\\\"accept\\\">> => <<\\\"*/*\\\">>,<<\\\"host\\\">> => <<\\\"localhost:4000\\\">>,<<\\\"user-agent\\\">> => <<\\\"curl/8.6.0\\\">>},ref => 'Elixir.PhoenixContainerExampleWeb.Endpoint.HTTP',body_length => 0,has_body => false,host_info => undefined,method => <<\\\"GET\\\">>,path_info => undefined,qs => <<>>,sock => {{127,0,0,1},4000},streamid => 1}}\",\"assigns\":[],\"body_params\":{\"__struct__\":\"Elixir.Plug.Conn.Unfetched\",\"aspect\":\"body_params\"},\"cookies\":{\"__struct__\":\"Elixir.Plug.Conn.Unfetched\",\"aspect\":\"cookies\"},\"halted\":\"false\",\"host\":\"localhost\",\"method\":\"GET\",\"owner\":\"<0.673.0>\",\"params\":{\"__struct__\":\"Elixir.Plug.Conn.Unfetched\",\"aspect\":\"params\"},\"path_info\":\"[]\",\"path_params\":[],\"port\":\"4000\",\"private\":[],\"query_params\":{\"__struct__\":\"Elixir.Plug.Conn.Unfetched\",\"aspect\":\"query_params\"},\"query_string\":\"\",\"remote_ip\":\"{127,0,0,1}\",\"req_cookies\":{\"__struct__\":\"Elixir.Plug.Conn.Unfetched\",\"aspect\":\"cookies\"},\"req_headers\":\"[{<<\\\"accept\\\">>,<<\\\"*/*\\\">>},{<<\\\"host\\\">>,<<\\\"localhost:4000\\\">>},{<<\\\"user-agent\\\">>,<<\\\"curl/8.6.0\\\">>}]\",\"request_path\":\"/\",\"resp_body\":\"nil\",\"resp_cookies\":[],\"resp_headers\":\"[{<<\\\"cache-control\\\">>,<<\\\"max-age=0, private, must-revalidate\\\">>}]\",\"scheme\":\"http\",\"script_name\":\"[]\",\"secret_key_base\":\"nil\",\"state\":\"unset\",\"status\":\"nil\"},\"crash_reason\":\"{#{message => <<\\\"bad argument in arithmetic expression\\\">>,'__struct__' => 'Elixir.ArithmeticError','__exception__' => true},[{erlang,'+',[1,a],[{error_info,#{module => erl_erts_errors}}]},{'Elixir.PhoenixContainerExampleWeb.PageController',home,2,[{file,\\\"lib/phoenix_container_example_web/controllers/page_controller.ex\\\"},{line,8}]},{'Elixir.PhoenixContainerExampleWeb.PageController',action,2,[{file,\\\"lib/phoenix_container_example_web/controllers/page_controller.ex\\\"},{line,1}]},{'Elixir.PhoenixContainerExampleWeb.PageController',phoenix_controller_pipeline,2,[{file,\\\"lib/phoenix_container_example_web/controllers/page_controller.ex\\\"},{line,1}]},{'Elixir.Phoenix.Router','__call__',5,[{file,\\\"lib/phoenix/router.ex\\\"},{line,484}]},{'Elixir.PhoenixContainerExampleWeb.Endpoint',plug_builder_call,2,[{file,\\\"lib/phoenix_container_example_web/endpoint.ex\\\"},{line,1}]},{'Elixir.PhoenixContainerExampleWeb.Endpoint','call (overridable 3)',2,[{file,\\\"deps/plug/lib/plug/debugger.ex\\\"},{line,136}]},{'Elixir.PhoenixContainerExampleWeb.Endpoint',call,2,[{file,\\\"lib/phoenix_container_example_web/endpoint.ex\\\"},{line,1}]},{'Elixir.Phoenix.Endpoint.SyncCodeReloadPlug',do_call,4,[{file,\\\"lib/phoenix/endpoint/sync_code_reload_plug.ex\\\"},{line,22}]},{'Elixir.Plug.Cowboy.Handler',init,2,[{file,\\\"lib/plug/cowboy/handler.ex\\\"},{line,11}]},{cowboy_handler,execute,2,[{file,\\\"/Users/jake/work/phoenix_container_example/deps/cowboy/src/cowboy_handler.erl\\\"},{line,37}]},{cowboy_stream_h,execute,3,[{file,\\\"/Users/jake/work/phoenix_container_example/deps/cowboy/src/cowboy_stream_h.erl\\\"},{line,306}]},{cowboy_stream_h,request_process,3,[{file,\\\"/Users/jake/work/phoenix_container_example/deps/cowboy/src/cowboy_stream_h.erl\\\"},{line,295}]},{proc_lib,init_p_do_apply,3,[{file,\\\"proc_lib.erl\\\"},{line,329}]}]}\",\"domain\":\"[cowboy]\",\"error_logger\":{\"tag\":\"error\"},\"gl\":\"<0.394.0>\",\"otel_span_id\":\"052d4929d398aec6\",\"otel_trace_flags\":\"01\",\"otel_trace_id\":\"66b7dd4d7dad9f9aba84fb43389b4611\",\"pid\":\"<0.672.0>\",\"time\":\"2024-08-10T16:36:13.127320-05:00\",\"xray_trace_id\":\"1-66b7dd4d-dad9f9aba84fb43389b4611@052d4929d398aec6\"}\n" + >>, iolist_to_binary( logger_formatter_json:format(#{level => info, msg => {string, "abc"}, meta => Meta}, Config) )