PatrickSachs
Log Level on "info" despite configured otherwise
Hello there!
I am currently facing an issue with the logger.
At some point it started logging at info level only despite being configured to log at debug level. The interesting thing is that it used to work fine before. I am not sure what broke it, since I wasn’t working on the project for over a month. So it may have been a breaking Elixir update or a lack of knowledge by making a bad change on my part.
This is my elixir version:
patrick@PATRICK:~$ elixir -v
Erlang/OTP 22 [erts-10.6.1] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [hipe]
Elixir 1.9.4 (compiled with Erlang/OTP 21)
This is my logger configuration:
config :logger,
level: :debug
config :logger, :console,
metadata: :all,
level: :debug,
format: {Sahnee.Logger, :format}
(The formater is not related to this, removing the custom formater yielded the same result)
If I launch my application with iex -S mix the logger is configured to level info:
iex(2)> require Logger
Logger
iex(3)> Logger.level
:info
iex(4)> Logger.debug("debug")
:ok
iex(5)> Logger.info("info")
:ok
15:49:45-875 [info] #PID<0.1106.0>@.:5
info
iex(6)> Logger.configure(level: :debug)
:ok
iex(7)> Logger.debug("debug2")
:ok
15:49:56-202 [debug] #PID<0.1106.0>@.:7
debug2
Can anyone point out why this is happening? No calls to Logger.configure are made in the application code.
Thank you for your time!
Patrick
First Post!
hauleth
Are you using correct MIX_ENV?
Popular in Questions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance








