MycroftAI / mycroft-core

Mycroft Core, the Mycroft Artificial Intelligence platform.
https://mycroft.ai
Apache License 2.0
6.53k stars 1.27k forks source link

log files are bigger than 8MB #2941

Closed Olzeke51 closed 2 months ago

Olzeke51 commented 3 years ago

Describe the bug my 'Skill.log is 11MB -

To Reproduce run your system for a long time ?? longer than 'latest' releases .'

Expected behavior I read somewhere that log files would be replaced at 8MB size

Log files edited - added files July 04, 00:03 UTC big_files.tar.gz

Environment (please complete the following information):

Additional context Correct me / close this if I am under the wrong conception/information

PureTryOut commented 3 years ago

There is nothing in MyCroft that removes/replaces/reduces those logs. There is just a single line in the startup script that makes logs go there, clickety click, and it only uses a simple shell redirection to do so.

JarbasAl commented 3 years ago

I've had a device run out of disk space because of this (id say it took at least 1 year, probably more)

I now rotate my logs https://github.com/OpenVoiceOS/ovos_utils/blob/dev/ovos_utils/log.py

krisgesling commented 3 years ago

yeah I'll at the very least add log rotation to the Mark II, but we should consider how this is handled universally

@PureTryOut as a distro manager, would your preference be for a central Mycroft policy or to handle it at the system level?

PureTryOut commented 3 years ago

For system services I'd expect the service manager to handle it. MyCroft however is not a system service, at least not on regular desktops, but a user service and at least for non-systemd systems there is no way to handle such things outside of the program (that I know off). So my personal preference would be MyCroft handling it itself.

ChanceNCounter commented 3 years ago

https://docs.python.org/3/library/logging.handlers.html#baserotatinghandler?

forslund commented 2 months ago

Closing Issue since we're archiving the repo