profilecity / vidur

Vidur - Recruiting OS for forward thinking companies.
https://profilecity.xyz/vidur
Other
195 stars 85 forks source link

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

Open amandesai01 opened 1 month ago

VenkyGitRep commented 1 month ago

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

amandesai01 commented 1 month ago

go ahead, give it a try.

amandesai01 commented 1 month ago

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

VenkyGitRep commented 1 month ago

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 commented 1 month ago

@amandesai01 Can we have a quick chat somewhere?

amandesai01 commented 1 month ago

you can join discord from readme.

amandesai01 commented 1 month ago

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

VenkyGitRep commented 1 month ago

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 commented 1 month ago

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 commented 1 month ago

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 commented 4 weeks ago

I've now submitted a PR.

VenkyGitRep commented 3 weeks ago

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

amandesai01 commented 3 weeks ago

@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.

harshil15999 commented 3 weeks ago

@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 commented 1 week ago

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

amandesai01 commented 1 week ago

I cleared out assignees until we have strong implementation proposal.