From c36df52a5a76a7f2c70c283510fdfd1160957055 Mon Sep 17 00:00:00 2001 From: Gonzalo <456459+grzuy@users.noreply.github.com> Date: Thu, 20 Jun 2024 17:09:51 -0300 Subject: [PATCH] feat: actually notify about unrecognized log events --- lib/tower/logger_handler.ex | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/tower/logger_handler.ex b/lib/tower/logger_handler.ex index 19f46a3..38fd11c 100644 --- a/lib/tower/logger_handler.ex +++ b/lib/tower/logger_handler.ex @@ -94,8 +94,10 @@ defmodule Tower.LoggerHandler do end def log(log_event, _config) do - IO.puts( - "[Tower.LoggerHandler] UNHANDLED LOG EVENT log_event=#{inspect(log_event, pretty: true)}" - ) + warning_message = + "[Tower.LoggerHandler] UNRECOGNIZED LOG EVENT log_event=#{inspect(log_event, pretty: true)}" + + IO.puts(warning_message) + Tower.handle_message(:warning, warning_message) end end