jester icon indicating copy to clipboard operation
jester copied to clipboard

Too verbose by default

Open nuxeh opened this issue 6 years ago • 3 comments

Personally, i find the print on start:

INFO Jester is making jokes at http://0.0.0.0:5000

to be undesirable by default, is there some way to disable it?

I've tried the suggested workaround at https://forum.nim-lang.org/t/4352, but it doesn't seem to work.

Thanks.

nuxeh avatar Feb 09 '19 19:02 nuxeh

That should work, you need that line before any routes though, where are you placing it?

dom96 avatar Feb 10 '19 19:02 dom96

I put logging.setLogFilter(lvlNotice) immediately before routes: and the message above still appears, as well as debug level messages generated on requests.

I don't know if this is a confirmation of what ggibson said on the forum, or not.

Presuming the above fix worked, what if i also want to use logging in my binary. Is there a way to modify the log level for jester only, leaving log messages in the parent code intact?

nuxeh avatar Feb 10 '19 23:02 nuxeh

Ahh, seems Jester sets the log level: https://github.com/dom96/jester/blob/master/jester.nim#L455

Happy to accept a PR that changes this I guess

dom96 avatar Feb 11 '19 21:02 dom96