Skip to content
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

Add 'Oban.Telemetry.detach_default_logger/0' #848

Merged
merged 3 commits into from
Feb 17, 2023

Conversation

nathanl
Copy link
Contributor

@nathanl nathanl commented Feb 17, 2023

My specific use case for this is to cut down noise when running priv/repo/seeds.exs in my app, but it seems generally useful to have.

CHANGELOG.md Outdated Show resolved Hide resolved
lib/oban/telemetry.ex Outdated Show resolved Hide resolved
lib/oban/telemetry.ex Outdated Show resolved Hide resolved
@@ -135,7 +135,30 @@ defmodule Oban.TelemetryTest do
assert logged =~ ~s("state":"failure")
assert logged =~ ~s|"error":"** (Oban.PerformError)|
after
:telemetry.detach("oban-default-logger")
Telemetry.detach_default_logger()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice improvement!

@sorentwo sorentwo added kind:enhancement New feature or request area:oss Related to Oban OSS labels Feb 17, 2023
@sorentwo
Copy link
Member

@nathanl This is a wonderful little touch and I can't believe it hasn't come up before!

@sorentwo sorentwo merged commit 2bb6660 into oban-bg:main Feb 17, 2023
@nathanl nathanl deleted the detach_default_logger branch February 17, 2023 20:22
tom-con pushed a commit to tom-con/oban that referenced this pull request May 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:oss Related to Oban OSS kind:enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants