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

refactor: using logger from @nuxt/kit #1926

Closed
wants to merge 3 commits into from

Conversation

ineshbose
Copy link
Collaborator

πŸ”— Linked issue

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 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)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

πŸ“ Checklist

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

@ineshbose
Copy link
Collaborator Author

Hi @kazupon, would you be able to provide advice on eliminating createDebug? I have no experience with it, but could be very good to remove it as a dependency if the logger is suitable.

Copy link
Collaborator

kazupon commented Mar 13, 2023

@ineshbose
I know that the logger provided by nuxt kit is consola.

consola can be filtered by log level using the environment variable CONSOLA_LEVEL.
https://github.com/unjs/consola#level

This is useful because it gives you control over features not available in debug module.

But, the ability to control log output with tag was not clear from my reading of the documentation.

The reason I use debug is that I can control consola's tag in detail using the DEBUG environment variable.
https://github.com/debug-js/debug

so this reason, I like to use it in my vue-i18n, intlify project and nuxt i18n module!
It would be nice to have the same functionality in consola.

@Atinux @pi0
Sorry to ping you and ask, as it is obvious if you read the consola code πŸ™‡β€β™‚οΈ
Is it possible to do something like filter by debug namespace in consola?

Copy link
Contributor

Atinux commented Mar 13, 2023

It would be very nice to add such feature in consola actually, could you open an issue there?

@ineshbose
Copy link
Collaborator Author

I'll make a temporary function around it for now.

@kazupon I'll wait to progress on this after #1938 has been merged as I see some log statements there along with a potential logger conflict. And then I'll move to #1943

@ineshbose ineshbose self-assigned this Mar 22, 2023
@ineshbose ineshbose added WIP v8 🍰 p2-nice-to-have Priority 2: nothing is broken but it's worth addressing labels Mar 22, 2023
@ineshbose
Copy link
Collaborator Author

Closing. Will reopen at a convenient time (unless someone picks it as a good first issue πŸ™‚).

@ineshbose ineshbose closed this Apr 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🍰 p2-nice-to-have Priority 2: nothing is broken but it's worth addressing v8 WIP
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants