ariandanim

ariandanim

Logger.warn/2 is deprecated

Dear all tim,

I don’t know to solved this warning when try make mix test,
this is the code i get

==> tailwind
Compiling 3 files (.ex)
    warning: Logger.warn/1 is deprecated. Use Logger.warning/2 instead
    │
 72 │       Logger.warn("""
    │              ~
    │
    └─ lib/tailwind.ex:72:14: Tailwind.start/2

    warning: Logger.warn/1 is deprecated. Use Logger.warning/2 instead
    │
 86 │         Logger.warn("""
    │                ~
    │
    └─ lib/tailwind.ex:86:16: Tailwind.start/2

Generated tailwind app

I am using :

  • Windows 11
  • Elixir 1.16.3
  • Phoenix 1.7.12
  • Erlang OTP 26

Marked As Solved

NobbZ

NobbZ

You can resolve that exactly like the warning suggests you to, use Logger.warning/* instead of Logger.warn/*.

Also Liked

garrison

garrison

The warning is from a library (Tailwind).

It was fixed in January and it looks like Jose tagged a release a few days ago but it hasn’t been published to Hex yet for some reason.

You can ignore this warning though, it’s just a deprecation warning. It will be fixed eventually.

NobbZ

NobbZ

Oooof, I assumed this was their own code and just carried that name (tailwind) coincidally… I usually do not care for warning not from my own code and again assumed no one else did…

ariandanim

ariandanim

Tks Brother @garrison for the update news

Last Post!

rhcarvalho

rhcarvalho

I know what you mean with treating them differently. I go on the cautious side and think when you depend on some code it becomes your code (i.e. need to care about security, correctness, performance, etc of third-party code and how it affects your project).

In this particular case, a call to the deprecated Log.warn will only become a real problem once, if ever, the method is removed. The general solution is indeed working with the maintainers of the dependency to have it updated (should be solved in a future release), or if that is not possible you can fork the dependency and fix it in your fork.

Where Next?

Popular in Questions Top

baxterw3b
Hi guys, i’m new in the Elixir world, and i have to say, that i love it! i’m having some problem to understand anonymous functions with ...
New
jononomo
I am trying to figure out how Mix knows whether the environment is test, dev, or prod – where is this set? Thanks.
New
Brian
What is the proper way to load a module from a file in to IEX? In the python world, doing something like this pretty standard: from ....
New
ovidiubadita
Hey all, I discovered Elixir and I love it. I always wanted to learn a functional programming and I intended to go for Haskell, but afte...
New
9mm
I am constructing a JSON object (map) and I need to conditionally set a field. I’m trying to write proper elixir-way code… and I’m at a l...
New
jerry
Good day to you all. I have been struggling to get a query involving like and ilike to work. Can anyone assist me on this, please? pro...
New
svb
Hi! Currently I want to submit a form by pressing the Enter key. However, since my input field is of type “textarea” this is just adds a...
New

Other popular topics Top

vertexbuffer
Hello, can anybody help here..? I have a list of players and I what to delete an element, but every for loop the list is reverting to ori...
New
dogweather
I wrote this comment on r/haskell, and it’s not popular there. :wink: But I think I’m on to something… Haskell reminds me of Java, and e...
New
AstonJ
Seen any cool LiveView demos, sample apps or examples? Please post them here! :003:
New
bsollish-terakeet
Credo is smart enough to check for (something like) this: assert length(the_list) == 0 with this response: Checking if an enum is empt...
New
Patoshizzle
After calling mix ecto.create I get this error: 17:00:32.162 [error] GenServer #PID<0.412.0> terminating ** (Postgrex.Error) FATAL...
New
jason.o
In the code below, if the create action is not set to accept “extra_key” as an input, it errors out with a message shown above. Is there ...
New

We're in Beta

About us Mission Statement