[685] Change Log level at web gui
Posted: Sunday 10 January 2016 15:10
It should be possible to change loglevel from the configuration section in the GUI.
By default, all events are logged, including those for reading motherboard sensors and sensors that are periodically queried for values. That may be one event per second or even more.
This kind of logging is valuable when you're debugging or ensuring that your new added sensor is working as expected, but in all other circumstances it brings more trouble than benefit.
This logging level, ends in relative big files in small installation systems. That couldn't be a problem for someones.
As I see it, the most important problem is that it translates in so many disk writes per minute. It would drastically reduce the lifespan of SD cards and even SSD discs.
One may say that log level can be changed on program launch, but could not be possible.
I can apport one scenario with even worse effects. In my case, I use domoticz inside a docker container. So there's no easy way for changing the startup command for altering loglevel as will.
I mounted a share in my ZFS array for config target. There domoticz saves it's log. This array is formed by small disks, that I only use for small things like small backups, uploadings and such. Those disks are manufacturer configured to spin down for noise/energy reduction purposes.
The effect in my system is that 6 disks are continuously spinning up and down and I can't do anything for it. They are currently throwing smart errors for pw up/dwn cycles.
Yes there's some odd behavior for those disks spinning down so early. I could also try to write to an in ram fs, but it complicates in excess the docker running system.
If loglevel could be modified at the gui, it would be easy for me to raise the detail only when needed and I could afford some wakes on disks every now and then.
I find it a logical feature, the default log level to be set at 1 and being able to change it from the gui.
By default, all events are logged, including those for reading motherboard sensors and sensors that are periodically queried for values. That may be one event per second or even more.
This kind of logging is valuable when you're debugging or ensuring that your new added sensor is working as expected, but in all other circumstances it brings more trouble than benefit.
This logging level, ends in relative big files in small installation systems. That couldn't be a problem for someones.
As I see it, the most important problem is that it translates in so many disk writes per minute. It would drastically reduce the lifespan of SD cards and even SSD discs.
One may say that log level can be changed on program launch, but could not be possible.
I can apport one scenario with even worse effects. In my case, I use domoticz inside a docker container. So there's no easy way for changing the startup command for altering loglevel as will.
I mounted a share in my ZFS array for config target. There domoticz saves it's log. This array is formed by small disks, that I only use for small things like small backups, uploadings and such. Those disks are manufacturer configured to spin down for noise/energy reduction purposes.
The effect in my system is that 6 disks are continuously spinning up and down and I can't do anything for it. They are currently throwing smart errors for pw up/dwn cycles.
Yes there's some odd behavior for those disks spinning down so early. I could also try to write to an in ram fs, but it complicates in excess the docker running system.
If loglevel could be modified at the gui, it would be easy for me to raise the detail only when needed and I could afford some wakes on disks every now and then.
I find it a logical feature, the default log level to be set at 1 and being able to change it from the gui.