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

Use tagged logger already configured on Rails #489

Merged
merged 3 commits into from
Feb 26, 2024
Merged

Use tagged logger already configured on Rails #489

merged 3 commits into from
Feb 26, 2024

Conversation

kriansa
Copy link
Contributor

@kriansa kriansa commented Feb 20, 2024

Fixes #488

  • fix: call tagged from an existing tagged logger
  • fix: correctly uninitialize logger between runs

This way we're ensuring that `dotenv` will work with any tagged logger
with the same interface, without ever replacing the original object.
@bkeepers bkeepers merged commit ccfabc0 into bkeepers:main Feb 26, 2024
12 checks passed
@bkeepers
Copy link
Owner

Thanks @kriansa, I'll get a release out soon.

@brosintoski
Copy link

this change caused:

.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/semantic_logger-4.15.0/lib/semantic_logger/base.rb:190:in `block in tagged': no block given (yield) (LocalJumpError)
	from /Users/bradleyrosintoski/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/semantic_logger-4.15.0/lib/semantic_logger/semantic_logger.rb:319:in `fast_tag'
	from /Users/bradleyrosintoski/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/semantic_logger-4.15.0/lib/semantic_logger/base.rb:197:in `tagged'
	from /Users/bradleyrosintoski/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/dotenv-3.0.3/lib/dotenv/rails.rb:93:in `block in <class:Rails>'

bkeepers added a commit that referenced this pull request Feb 27, 2024
bkeepers added a commit that referenced this pull request Feb 27, 2024
bkeepers added a commit that referenced this pull request Feb 27, 2024
that-jill referenced this pull request in powerhome/power-web-development-interview Feb 27, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [dotenv-rails](https://github.com/bkeepers/dotenv) | `3.0.2` ->
`3.1.0` |
[![age](https://developer.mend.io/api/mc/badges/age/rubygems/dotenv-rails/3.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/rubygems/dotenv-rails/3.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/rubygems/dotenv-rails/3.0.2/3.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/rubygems/dotenv-rails/3.0.2/3.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>bkeepers/dotenv (dotenv-rails)</summary>

###
[`v3.1.0`](https://github.com/bkeepers/dotenv/blob/HEAD/Changelog.md#310)

**What's Changed**

- Fix regression with semantic-logger, allow setting custom logger by
[@&#8203;bkeepers](https://github.com/bkeepers) in
[https://github.com/bkeepers/dotenv/pull/494](https://github.com/bkeepers/dotenv/pull/494)
    ```ruby
    ```

###
[`v3.0.3`](https://github.com/bkeepers/dotenv/blob/HEAD/Changelog.md#303)

[Compare
Source](https://github.com/bkeepers/dotenv/compare/v3.0.2...v3.0.3)

**What's Changed**

- Solve circular require warning by
[@&#8203;martijnbolhuis](https://github.com/martijnbolhuis) in
[https://github.com/bkeepers/dotenv/pull/491](https://github.com/bkeepers/dotenv/pull/491)
- Use tagged logger already configured on Rails by
[@&#8203;kriansa](https://github.com/kriansa) in
[https://github.com/bkeepers/dotenv/pull/489](https://github.com/bkeepers/dotenv/pull/489)
- Fix exception on startup for Rails 7.1.0 by
[@&#8203;bkeepers](https://github.com/bkeepers) and
[@&#8203;zspencer](https://github.com/zspencer) in
[https://github.com/bkeepers/dotenv/pull/492](https://github.com/bkeepers/dotenv/pull/492)

**New Contributors**

- [@&#8203;zspencer](https://github.com/zspencer) made their first
contribution in
[https://github.com/bkeepers/dotenv/pull/492](https://github.com/bkeepers/dotenv/pull/492)
- [@&#8203;martijnbolhuis](https://github.com/martijnbolhuis) made
their first contribution in
[https://github.com/bkeepers/dotenv/pull/491](https://github.com/bkeepers/dotenv/pull/491)
- [@&#8203;kriansa](https://github.com/kriansa) made their first
contribution in
[https://github.com/bkeepers/dotenv/pull/489](https://github.com/bkeepers/dotenv/pull/489)

**Full Changelog**:
bkeepers/dotenv@v3.0.2...v3.0.3

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/powerhome/power-web-development-interview).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yMTIuMCIsInVwZGF0ZWRJblZlciI6IjM3LjIxMi4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
@rondales
Copy link

Fixes #488

  • fix: call tagged from an existing tagged logger
  • fix: correctly uninitialize logger between runs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use existing TaggedLogger instead of re-wrapping it with TaggedLogging
4 participants