Terisback / discord.v

Discord Bot Framework written in V
MIT License
120 stars 12 forks source link

Disable debug logs #5

Closed Androz2091 closed 3 years ago

Androz2091 commented 3 years ago

Hello :wave: First of all, thank you for building this library (I started to make one myself then I saw this lib 😄)

I saw the comment in discord.v/util/log.v, "Remove then release". I think logs should be kept for debugging purposes, but it would be nice to be able to disable them (maybe using a DV_DEBUG environment variable or something like that?).

Thank you

Terisback commented 3 years ago

Yes, I'll add a debug flag. This was the original idea) This issue refers to item from TODO, more "fancy" logs

Thanks for using my lib)

Terisback commented 3 years ago

We can temporarily use the module log What do you think?

Androz2091 commented 3 years ago

We can temporarily use the module log What do you think?

Yes sure, they are sufficient 👍

Terisback commented 3 years ago

yep, I've implemented my own log now it's somehow customizable. Also, you can add argument -d dv_debug to change log level to .debug .

What do you think?

Terisback commented 3 years ago

Or is it better to use env variable?

Terisback commented 3 years ago

Can you reply? @Androz2091

Androz2091 commented 3 years ago

Hello, it's still showing logs (such as [discord.v] #0 Successfully connected to gateway) without using -d dv_debug argument :thinking:

Terisback commented 3 years ago

forgot to set default log level to .warn fixed in ef6b980

Terisback commented 3 years ago

@Androz2091 Fixed?

Androz2091 commented 3 years ago

Yes, it works now 👍 Thank you, should I close this issue?

Terisback commented 3 years ago

yep

Androz2091 commented 3 years ago

@Terisback when running v run codersbot.v -d dv_debug, no logs are shown?

Terisback commented 3 years ago

@Androz2091 it's showing image

Androz2091 commented 3 years ago

Oh yes it works using -d before run