ExUnit.CaptureLog doesn't work properly anymore
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- elixir
- Domain
- observability
Research direction
Start by reproducing the issue with ExUnit.CaptureLog and the legacy logger backend configuration described in the report. Compare capture_log behavior with the ExUnit.CaptureLog documentation and verify both captured and uncaptured log output; done means captured logs are absent from the terminal while other log entries remain visible.
Written by the indexing model from the issue text.
Description
Due to https://github.com/elixir-lang/elixir/issues/12879, I've switched to the legacy logger backend from this repo. It works fine – logs output to console as it used to.
Expected behaviour
capture_log should capture log output, so assertions can be run and no output should be visible in the terminal.
Actual behaviour
Tests that use capture_log output logs to the console. The log gets captured and tests pass as they used to. ex_unit docs state that :console log backend is captured, so this kind of makes sense.
Partial solution
# test.exs
config :logger, backends: [:console]
config :logger, :console, []
This makes capturing work properly – no output to the console, but also no output from log entries that aren't captured, so some issues might be potentially missed.
- Dominant language
- Elixir
- Stars
- 61
- Forks
- 6
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from elixir-lang/logger_backends
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
elixir-lang/logger_backends#6 · 4 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
elixir-lang/logger_backends#4 · 2 comments ·
All issues in elixir-lang/logger_backends
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
carverauto/serviceradar#4744 ·
Maintainers usually reply within 1 day
-
L: javascript T: bug 🐞
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
dependabot/dependabot-core#16397 ·
Maintainers usually reply within 1 day
-
Bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
wintermeyer/vutuv#2297 ·
Maintainers usually reply within 1 day
-
high priority tachyon protocol
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
beyond-all-reason/teiserver#1616 ·
Maintainers usually reply within 1 day
-
extra_applications: [tools: :optional] crashes normalize_dep/1 (FunctionClauseError)Possibly taken @HackTuah claimed this 2 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
erlef/mix_sbom#157 · 1 comment · 1 assignee ·
Maintainers usually reply within 7 days