Skip to content

Commit

Permalink
Add fallbacks for Utils.info/1 and warning/1
Browse files Browse the repository at this point in the history
To allow for setups running a newer version of appsignal-elixir with
older versions of appsignal-phoenix or appsignal-plug, add a
deprecated fallback in order to not break any apps.

[changeset skip]
  • Loading branch information
jeffkreeftmeijer committed Jun 26, 2024
1 parent 0db9f7f commit c065f44
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions lib/appsignal/utils.ex
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,18 @@ defmodule Appsignal.Utils do

def module_name(module), do: module |> to_string() |> module_name()

@deprecated "Use Logger.info/1 instead."
def info(message) do
require Logger
Logger.info(message)
end

@deprecated "Use Logger.warning/1 instead."
def warning(message) do
require Logger
Logger.warning(message)
end

defmacro compile_env(app, key, default \\ nil) do
if Version.match?(System.version(), ">= 1.10.0") do
quote do
Expand Down

0 comments on commit c065f44

Please sign in to comment.