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

feat(kit): allow customising logger options #24243

Merged
merged 7 commits into from Nov 23, 2023

Conversation

DaniAcu
Copy link
Contributor

@DaniAcu DaniAcu commented Nov 10, 2023

πŸ”— Linked issue

This issues reported in unjs/consola and nuxt-modules/tailwindcss. Show that developers are struggleling with the possibility to pass level configuration to their plugins. I check in consola repository but everything is okay from their side, but our kit is not exposing a clear way to customize the logger.

unjs/consola#253
nuxt-modules/tailwindcss#732

❓ Type of change

  • πŸ“– Documentation (updates to the documentation, readme or JSdoc annotations)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

Currently this implementaion only allowed to pass options when you are using a tag.

useLogger("tag", { level: 0 });

But is not allowed to passing options configuration only.

useLogger({ level: 0 });

We can do it if you consider it as a better option.

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

Copy link

stackblitz bot commented Nov 10, 2023

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

Copy link

nuxt-studio bot commented Nov 10, 2023

βœ… Live Preview ready!

Name Edit Preview Latest Commit
Nuxt Docs Edit on Studio β†—οΈŽ View Live Preview ca619d5

@DaniAcu DaniAcu force-pushed the feat/add-options-for-use-logger branch from ca619d5 to b8122dd Compare November 10, 2023 17:28
@danielroe danielroe requested a review from pi0 November 13, 2023 11:53
@danielroe danielroe changed the title feat: add options for use logger feat(kit): allow customising logger options Nov 13, 2023
@Atinux
Copy link
Member

Atinux commented Nov 15, 2023

I like the idea πŸš€

Copy link
Member

@pi0 pi0 left a comment

Choose a reason for hiding this comment

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

Nice idea!

@danielroe danielroe added this to the 3.9 milestone Nov 15, 2023
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests βœ…

❗ No coverage uploaded for pull request base (main@338908e). Click here to learn what that means.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #24243   +/-   ##
=======================================
  Coverage        ?   58.76%           
=======================================
  Files           ?        5           
  Lines           ?      861           
  Branches        ?       46           
=======================================
  Hits            ?      506           
  Misses          ?      355           
  Partials        ?        0           

β˜” View full report in Codecov by Sentry.
πŸ“’ Have feedback on the report? Share it here.

@danielroe danielroe merged commit c214869 into nuxt:main Nov 23, 2023
35 checks passed
@github-actions github-actions bot mentioned this pull request Nov 23, 2023
@DaniAcu DaniAcu deleted the feat/add-options-for-use-logger branch November 28, 2023 00:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants