Mycroft verbosity and trace for debugging

Skill name: Mycroft verbosity

User story:

_As a Mycroft developer I want this Skill to let me turn verbosity up on the command line interface so that I can better understand what’s going on inside of Mycroft.
eg. For example, I would say “Hey mycroft, In the CLI, set verbosity to (normal|high|very high).” If I said “high” then verbosity would go up, and I would see JSON intent packets printed for all forthcoming commands. I’d be much better able to debug failed commands.

What third party services, data sets or platforms will the Skill interact with?
None - all internal to Mycroft

Are there similar Mycroft Skills already?
I don’t know of any.

What will the user Speak to trigger the Skill?

In the CLI …

What phrases will Mycroft Speak?

Verbosity is now set to “value”

What Skill Settings will this Skill need to store?

Can’t think of any.

Other comments?

Besides verbosity level, it may be nice to turn code trace on or off also.

Yo can in the cli client enter

:log level debug

see more comand by entering

:help

and then the log will show what you want. But a skil that does the same would be nice to.

And in the cli-client code this results in a bus.emit(Message("mycroft.debug.log", data={'level': level}))

If this works like I think this should be super easy to program. Give me a day or two and you will have a new skill…

@gez-mycroft looks like the mycroft.debug.log message is missing in the Messagebus docs

3 Likes

Thanks for the nudge Dom, it looks like there are a few missing, I’ll update the list this week.

May just be me, but that table doesn’t really work on GitBook either…

1 Like

So here we go: https://github.com/domcross/mycroft-verbosity-skill

Currently the mapping of verbosity to log levels is “hardcoded” (low=ERROR, normal=INFO, high=DEBUG). If there is demand for it this could be made configurable in the skill settings.

Another possible enhancement could be a “increase/lower log level” intent, but I did not figure out yet how to retrieve the current loglevel.

2 Likes

Andlo,

Wow, did not know about all of this function. It’s probably in the documentation, but I missed it.

Thanks so much!

-Mike Mac

Dominik, Wow that was fast. Thanks! I installed it and it works fine:

set verbosity to high                                           
 >> Verbosity is now high 
-Mike Mac
1 Like