Skip to content

Always respect options passed to capture_log #12721

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 27, 2023

Conversation

sabiwara
Copy link
Contributor

@sabiwara sabiwara commented Jun 27, 2023

Close #12720

update_handler_config/3seems to work but I'm not sure if there is a need for a more involved fix, and if this might create issues when used concurrently with different options?

@sabiwara sabiwara force-pushed the 12720-capture-log-options branch from 2e2f720 to 051aff2 Compare June 27, 2023 00:33
@sabiwara sabiwara changed the title WIP capture_log option bug Always respect options passed to capture_log Jun 27, 2023
@sabiwara sabiwara marked this pull request as ready for review June 27, 2023 00:41
@josevalim
Copy link
Member

I think instead of storing the formatter as a logger config, we will need to store it in the ets table. Then we call the formatter for each capture in the table.

@sabiwara
Copy link
Contributor Author

I think instead of storing the formatter as a logger config, we will need to store it in the ets table. Then we call the formatter for each capture in the table.

Yes that would make much more sense indeed. Thank you 💜

@sabiwara sabiwara force-pushed the 12720-capture-log-options branch from 051aff2 to 3ce206f Compare June 27, 2023 10:57
@sabiwara sabiwara force-pushed the 12720-capture-log-options branch from 3ce206f to 33cec48 Compare June 27, 2023 10:58
@sabiwara
Copy link
Contributor Author

Re-pushed 33cec48.

@sabiwara sabiwara merged commit c312b47 into elixir-lang:main Jun 27, 2023
@sabiwara sabiwara deleted the 12720-capture-log-options branch June 27, 2023 11:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

capture_log/2 options no longer affect captured log output when ExUnit configured to capture_log: true
2 participants