Replies: 1 comment
-
@hotting What I did, was to modify the solis.sh script, to start each day with a fresh solis.log file, by adding:
My modified solis.sh script looks like this:
Of course you could make the solis.sh script more intelligent, to keep more than 1 logfile or do something special to backup/halve it, before starting the python script. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The logging works perfectly.
Only one point of improvement is the growth of the log file. A log file is generally only used in special circumstances that do not occur very often. The log file can therefore grow unnoticed to an undesired size.
To prevent this, every daily start of the script can be checked whether the log file exceeds a certain size and then halve it, for example. This way you can always have a number of days of log available by choosing the right size.
Another possibility is to let the logfile rotate in the logrotate of the raspberry. This makes the script less easy to install as it requires specific knowledge of the logrotate system
A suggestion for the first option is:
Beta Was this translation helpful? Give feedback.
All reactions