Skip to content

Commit

Permalink
Update utils.ex
Browse files Browse the repository at this point in the history
Remove warning:

Compiling 5 files (.ex)
    warning: Application.get_env/3 is discouraged in the module body, use Application.compile_env/3 instead
    │
  6 │   if Application.get_env(:bypass, :enable_debug_log, false) do
    │                  ~
    │
    └─ lib/bypass/utils.ex:6:18: Bypass.Utils (module)
  • Loading branch information
bradhanks authored Jan 1, 2024
1 parent 7034e0b commit bec340b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/bypass/utils.ex
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ defmodule Bypass.Utils do

Application.load(:bypass)

if Application.get_env(:bypass, :enable_debug_log, false) do
if Application.compile_env(:bypass, :enable_debug_log, false) do
defmacro debug_log(msg) do
quote bind_quoted: [msg: msg] do
require Logger
Expand Down

0 comments on commit bec340b

Please sign in to comment.