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

Create a Consola instance in utils/logger.ts #61

Open
Tracked by #60
amandesai01 opened this issue Aug 8, 2024 · 16 comments
Open
Tracked by #60

Create a Consola instance in utils/logger.ts #61

amandesai01 opened this issue Aug 8, 2024 · 16 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@amandesai01
Copy link
Member

No description provided.

@amandesai01 amandesai01 added enhancement New feature or request good first issue Good for newcomers labels Aug 8, 2024
@VenkyGitRep
Copy link

I'd like to work on this issue. @amandesai01

@amandesai01
Copy link
Member Author

go ahead, give it a try.

@amandesai01
Copy link
Member Author

@VenkyGitRep any updates? you still working? feel free to share your implementation via draft pr.

@VenkyGitRep
Copy link

I've managed to get things running in my local yesterday. I had an interview last night, and had to pause work on this issue for a bit. I'll be working on setting up console today, will share an update by the evening.

@VenkyGitRep
Copy link

@amandesai01 Can we have a quick chat somewhere?

@amandesai01
Copy link
Member Author

you can join discord from readme.

@amandesai01
Copy link
Member Author

@VenkyGitRep you want me to take over? or wanna give it a try?

@VenkyGitRep
Copy link

Okay, go head. The changes I've made are in
nuxt.config.ts - here I included [plugin](plugins: ['~/plugins/logger.ts'], // Consola logger)
and login.ts file under plugins.
I'll watch this PR, so I know what the right changes are.Thanks!

@amandesai01
Copy link
Member Author

We don't want logger in frontend. You can refer parent issue.
You are on right path! you will have to create plugin in src/server/plugins, and use it in src/server. No frontend code shall need modification.
Wanna give it a try?

@VenkyGitRep
Copy link

sure, I can chew on this later today. I think I can have this working. Thanks for the direction, I'll get back when I have some questions.

@VenkyGitRep
Copy link

I've now submitted a PR.

@VenkyGitRep
Copy link

@amandesai01 What do you think? I've submitted a new PR.

@amandesai01
Copy link
Member Author

@VenkyGitRep changes are good so far, but we still need some research. We want logger to have a dynamic tag with request path. And when we log something, it should also log request path. This will help in debugging by helping us identify what exactly happened with the request.
In order to do that, we would need to have a middleware inject a logger with the tag and then entire request context should have access to logger.

Problem statement is weird and I don't know if that is possible in Nitro yet. But a research on this is necessary.

@amandesai01 amandesai01 added help wanted Extra attention is needed and removed good first issue Good for newcomers labels Aug 20, 2024
@harshil15999
Copy link
Contributor

@VenkyGitRep changes are good so far, but we still need some research. We want logger to have a dynamic tag with request path. And when we log something, it should also log request path. This will help in debugging by helping us identify what exactly happened with the request.

In order to do that, we would need to have a middleware inject a logger with the tag and then entire request context should have access to logger.

Problem statement is weird and I don't know if that is possible in Nitro yet. But a research on this is necessary.

Also for each request we would need to generate a unique id so while seeing the logs we will be able to understand the flow

@amandesai01
Copy link
Member Author

Let's research on this, as this is the next target.

@amandesai01
Copy link
Member Author

I cleared out assignees until we have strong implementation proposal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants