oboudry
During mix test, is there a way to see logs from tested app, e.g. controller?
I can see Logger outputs from my test scripts, but when I add Logger statements into the tested application, these won’t show during the mix test run. Is there a way to save or view Logger outputs from within the tested application ?
Marked As Solved
kelvinst
Well, actually Logger is an app itself, which all other apps send messages to it when they want to log something to the Logger output, which by default is your stdio. So there should be no difference calling Logger.debug from inside two different apps.
Also Liked
kelvinst
Just change the line:
config :logger, level: :warn
To:
config :logger, level: :debug
On your config/test.exs file.
oboudry
I assumed controller show was called because my controller test is calling get. But after putting a custom logger plug within my router file, I realize the show function is not reached. I get redirected before reaching it. Thanks for your help.
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









