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

log_level and ignore_logs don't seem to be honored #1728

Closed
ndarilek opened this issue Aug 12, 2018 · 2 comments · Fixed by #1832
Closed

log_level and ignore_logs don't seem to be honored #1728

ndarilek opened this issue Aug 12, 2018 · 2 comments · Fixed by #1832

Comments

@ndarilek
Copy link
Contributor

I have the following in ~/.mycroft/mycroft.conf:

  "ignore_logs": ["enclosure.mouth.viseme", "enclosure.mouth.display"],
  "log_level": "INFO"

Yet I still have very verbose logs like:

17:04:32.697 - urllib3.connectionpool - DEBUG - https://api.mycroft.ai:443 "POST /v1/device/63d47614-e4ba-41c0-988c-ad374243e325/metric/timing HTTP/1.1" 200 335
17:04:32.763 - mycroft.messagebus.service.ws:on_message:41 - DEBUG - {"type": "enclosure.mouth.viseme", "data": {"until": 1534111472.894686, "code": "0"}, "context": null}
17:04:32.893 - mycroft.skills.settings:_request_my_settings:440 - DEBUG - getting skill settings from server for HomeAssistantSkill
17:04:32.910 - urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): api.mycroft.ai:443
17:04:32.911 - mycroft.messagebus.service.ws:on_message:41 - DEBUG - {"type": "enclosure.mouth.viseme", "data": {"until": 1534111473.0393858, "code": "2"}, "context": null}

I'm a screen reader user, and reading these logs is painfully tedious. Searching is OK if I know what to search for, but sometimes I don't. Enclosure logs aren't really useful for me since I don't have one, and the API calls to update settings almost always succeed, yet they're outputting 10 lines to the logs every 30 seconds.

I know there are ways to split the logs, and I know the default setup does this, but even when split up, too much information is too much information. It would be very helpful if Mycroft could honor these configuration settings so I can limit what gets logged.

Thanks!

@forslund
Copy link
Collaborator

forslund commented Aug 13, 2018

The log_level seems to be only checked in the sys config /etc/mycroft/mycroft.conf mycroft.util.log#L65

The ignore_logs is set in the cli config ~/.mycroft_cli.conf (And only influences the cli output)

Edit: got confused with filter which is for the cli client. ignore_logs seems like it should be filtering out messagebus messages from the log. I think this actually works since I have logs like

22:18:46.053 - SKILLS - DEBUG - {"type": "mycroft.skill.handler.start", "data": {"handler": "fallback"}, "context": {}}

but not none where type is enclosure.mouth.viseme.

@forslund
Copy link
Collaborator

forslund commented Oct 2, 2018

To make the logging respect the config in ~/.mycroft/mycroft.conf the code at https://github.com/MycroftAI/mycroft-core/blob/dev/mycroft/util/log.py#L64

needs to be modified to also read the file ~/.mycroft/mycroft.conf and do a check if the log_level is set there as well before falling back to the default DEBUG

forslund added a commit that referenced this issue Oct 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants