-
Notifications
You must be signed in to change notification settings - Fork 62
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
current.log is getting too big #4
Comments
This seems to be an issues with all those scripts based on the same work by @fabian-lauer ?! This happens whenever something goes wrong an floods the log. This is a serious issue, as, as soon as the file is >2Gb it can't be addressed by 32bit venusos anymore. |
Ok - got it …. So we need a proper logging framework. |
Sorry. No idea. I just discovered the issue. :( |
Will try this one here after my vacation: https://www.blog.pythonlibrary.org/2014/02/11/python-how-to-create-rotating-logs/ currently no notebook in place 😎 |
Nice. Yeah logrotate - no idea why it seems not to be inplemented in venusOS?! |
I have rotatelog already integrated. Will make a fork and and this |
Great! Will you post a link to the fork? Why not just update the original version? I think it's benefical (if not mandatory) for every user, as a not noticed error can render the whole partition unusable and unwriteable as it's 100% full. |
I have created a pull request for the original fork. viktOrm can merge the changes into his main. I saw your bugreport and changed it 3 days ago before installing on the Cerbo of my friend. |
Is there a solution meanwhile? My memory was full and VenusOS didn't run properly anymore because I had two log files with 2.2 and 3 GB each. |
@e-i-k-e just delete the logs files via SSH |
Logical. But this does not permanently solve the problem. |
I tried with a pull request but it seems vikt=rm is gone ... Therefore I removed my fork. With these changes you will get rotating logfiles for 7 days. the older log-files will be deleted. adjust the following: in line 5 after import logging add from logging.handlers import TimedRotatingFileHandler in main after line 194 insert log rotate handler and change logging.basic... as below. Not sure why with posting the __ file __ is changing. Please use the same as in the original. logging.basicConfig(format='%(asctime)s,%(msecs)d %(name)s %(levelname)s %(message)s', |
Sorry for being absent for so long time, now I started again maintaining the code. Since I finally got my Multiplus 2 5000, battery and final PV installation these days. Will add the rotating log to my implementation, that is very good idea! Thanks for the hint! |
Isn't there a somehow "standard" approach for logging (which would also end up in /var/log and probably using the strange timestamping you need tai64n for? - I didn't search but this driver is not the first one, so I guess the victron guys did their job here and you could "simply" reuse it. |
Hello all, yes there is a standard approach within Venus OS, which I’d really prefer that everyone sticks to. I’ve explained it here: Todays current.log file approach is causing our users quite some headaches, and support issues sent to our distributors, and so forth. Please help sort this sooner rather than later - thanks. |
Fix for vikt0rm#4 by implementing a size limit for current.log
Hello,
I noticed that the "current.log" file has grown to over 300 Mb in the meantime. Is there a possibility to limit the log file or that it cleans itself?
The text was updated successfully, but these errors were encountered: