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

Allow a custom Logger to be used as the backend for boa_runtime::Console #3943

Merged
merged 2 commits into from
Aug 14, 2024

Conversation

hansl
Copy link
Contributor

@hansl hansl commented Aug 3, 2024

There are some cleanup that could be done in the number of lines of codes, but this was the smallest change I could do to make the change.

This comes from a need to implement Console with using tracing as the backend. Please note that there is an issue here where multiple logs in the same function (e.g. console.trace()) would output into multiple log entries. This should probably be fixed in a following PR (as this one is already large enough).

Copy link

codecov bot commented Aug 3, 2024

Codecov Report

Attention: Patch coverage is 51.61290% with 30 lines in your changes missing coverage. Please review.

Project coverage is 51.44%. Comparing base (6ddc2b4) to head (7d662ec).
Report is 229 commits behind head on main.

Files Patch % Lines
core/runtime/src/console/mod.rs 51.61% 30 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3943      +/-   ##
==========================================
+ Coverage   47.24%   51.44%   +4.19%     
==========================================
  Files         476      468       -8     
  Lines       46892    45168    -1724     
==========================================
+ Hits        22154    23235    +1081     
+ Misses      24738    21933    -2805     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@jedel1043 jedel1043 left a comment

Choose a reason for hiding this comment

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

Looks perfect to me!

@jedel1043 jedel1043 requested a review from a team August 3, 2024 20:50
@jedel1043 jedel1043 added enhancement New feature or request API labels Aug 3, 2024
@jedel1043 jedel1043 added this to the next-release milestone Aug 3, 2024
Copy link
Member

@jasonwilliams jasonwilliams left a comment

Choose a reason for hiding this comment

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

LGTM (apart from comment), thanks @hansl

@hansl hansl requested a review from jedel1043 August 14, 2024 16:08
@hansl
Copy link
Contributor Author

hansl commented Aug 14, 2024

I made the change, PTAL. Sorry I asked for a re-review from @jedel1043 by mistake.

@jedel1043 jedel1043 enabled auto-merge August 14, 2024 16:09
@jedel1043 jedel1043 added this pull request to the merge queue Aug 14, 2024
Merged via the queue into boa-dev:main with commit c6c6e4c Aug 14, 2024
14 checks passed
@hansl hansl deleted the console-custom-logger branch August 14, 2024 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants