Skip to content

Commit

Permalink
feat: actually notify about unrecognized log events
Browse files Browse the repository at this point in the history
  • Loading branch information
grzuy committed Jun 20, 2024
1 parent 24ba046 commit c36df52
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/tower/logger_handler.ex
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit c36df52

Please sign in to comment.