Skip to content

Commit

Permalink
Fix CI for Elixir 1.7 and others
Browse files Browse the repository at this point in the history
  • Loading branch information
g-andrade committed Oct 12, 2024
1 parent 02d351b commit 3995f8e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/sqids/hacks.ex
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ defmodule Sqids.Hacks do
using_mod_str = inspect(using_mod)

if missed_opts === [] do
Logger.warning("""
log_warning("""
Direct call of #{using_mod_str}.child_spec/1 may lead to unintended results in the future.
Update #{using_mod_str}'s entry under your supervisor,
Expand Down Expand Up @@ -70,4 +70,10 @@ defmodule Sqids.Hacks do
"""
end
end

if Version.match?(System.version(), "~> 1.11") do
def log_warning(msg), do: Logger.warning(msg)
else
def log_warning(msg), do: Logger.warning(msg)
end
end

0 comments on commit 3995f8e

Please sign in to comment.