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

fix: Ensure silent log level is respected with browser.transmit option #2052

Merged
merged 1 commit into from
Oct 15, 2024

Conversation

SrsDanny
Copy link
Contributor

The silent log level currently does not work in the browser when the browser.transmit option is used.

  • When options.level is set to "silent" and options.browser.transmit is used, everything gets logged as if options.level was the most verbose.
  • When options.level is non-silent (e.g. "info") and options.browser.transmit.level is "silent", the options.browser.transmit.send method is called for every log event above options.level, which should not occur.

This PR uses the levelToValue method which correctly handles the silent level to determine the transmitValue and methodValue, so the silent level works even when options.browser.transmit is used.

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

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

lgtm

@mcollina mcollina merged commit 84bbd35 into pinojs:main Oct 15, 2024
12 checks passed
alexandresoro pushed a commit to alexandresoro/ouca that referenced this pull request Oct 16, 2024
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [pino](https://getpino.io) ([source](https://github.com/pinojs/pino)) | dependencies | minor | [`9.4.0` -> `9.5.0`](https://renovatebot.com/diffs/npm/pino/9.4.0/9.5.0) |

---

### Release Notes

<details>
<summary>pinojs/pino (pino)</summary>

### [`v9.5.0`](https://github.com/pinojs/pino/releases/tag/v9.5.0)

[Compare Source](pinojs/pino@v9.4.0...v9.5.0)

#### What's Changed

-   build(deps-dev): bump [@&#8203;yao-pkg/pkg](https://github.com/yao-pkg/pkg) from 5.12.1 to 5.13.0 by [@&#8203;dependabot](https://github.com/dependabot) in pinojs/pino#2042
-   build(deps): bump pino-abstract-transport from 1.2.0 to 2.0.0 by [@&#8203;dependabot](https://github.com/dependabot) in pinojs/pino#2043
-   Update transports.md by [@&#8203;Jhon-Mosk](https://github.com/Jhon-Mosk) in pinojs/pino#2041
-   doc: Add Transport [@&#8203;macfja/pino-fingers-crossed](https://github.com/macfja/pino-fingers-crossed) by [@&#8203;MacFJA](https://github.com/MacFJA) in pinojs/pino#2047
-   build(deps-dev): bump [@&#8203;yao-pkg/pkg](https://github.com/yao-pkg/pkg) from 5.13.0 to 5.15.0 by [@&#8203;dependabot](https://github.com/dependabot) in pinojs/pino#2050
-   docs->added pino-hana transport by [@&#8203;HiImGiovi](https://github.com/HiImGiovi) in pinojs/pino#2059
-   docs -> [#&#8203;2061](pinojs/pino#2061) Alphabetize transport list and reorder sections in documentation by [@&#8203;superherobtf1985](https://github.com/superherobtf1985) in pinojs/pino#2062
-   feature: allow sync flag to be passed to ThreadStream for synchronous… by [@&#8203;karankraina](https://github.com/karankraina) in pinojs/pino#2063
-   fix: Ensure silent log level is respected with browser.transmit option by [@&#8203;SrsDanny](https://github.com/SrsDanny) in pinojs/pino#2052

#### New Contributors

-   [@&#8203;MacFJA](https://github.com/MacFJA) made their first contribution in pinojs/pino#2047
-   [@&#8203;HiImGiovi](https://github.com/HiImGiovi) made their first contribution in pinojs/pino#2059
-   [@&#8203;superherobtf1985](https://github.com/superherobtf1985) made their first contribution in pinojs/pino#2062
-   [@&#8203;karankraina](https://github.com/karankraina) made their first contribution in pinojs/pino#2063
-   [@&#8203;SrsDanny](https://github.com/SrsDanny) made their first contribution in pinojs/pino#2052

**Full Changelog**: pinojs/pino@v9.4.0...v9.5.0

</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 [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC4xMjQuMCIsInVwZGF0ZWRJblZlciI6IjM4LjEyNC4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiXX0=-->

Reviewed-on: https://git.tristess.app/alexandresoro/ouca/pulls/226
Reviewed-by: Alexandre Soro <code@soro.dev>
Co-authored-by: renovate <renovate@git.tristess.app>
Co-committed-by: renovate <renovate@git.tristess.app>
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.

2 participants