Page 1 of 1

[685] Change Log level at web gui

Posted: Sunday 10 January 2016 15:10
by Sergio
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.

Re: [685] Change Log level at web gui

Posted: Monday 11 January 2016 17:30
by Mediacj
Yes it would be great if we could select logging on/off for each sensor.

Besides that some time ago it was possible to change the log interval within settings beside of the days you could also set the log interval in minutes.
Mine was set to 1 minute which gave a perfect resolution in the graphs. But since the latest beta versions the setting disappeared and now the log interval has gone back to 5 minutes.

For the developers:
Is it possible to put back the setting where you can set the log interval in minutes or is there a special reason why it has been removed?
Thanks in advance :D

Re: [685] Change Log level at web gui

Posted: Monday 11 January 2016 17:53
by Sergio
Depending in where there's the hook in code for doing the sensors log, could be difficult for the developers to alter that interval. A code rework could be the reason for the change.
Regarding to this, a cached writing to the log and db would also be useful.
I'm talking about a buffered log wrapper. I've developed one, but I only work with VB/c#/j. Legacy C may be too much for me ;)

Enviado desde mi A0001 mediante Tapatalk

Re: [685] Change Log level at web gui

Posted: Friday 22 January 2016 23:02
by macieiks
It would be awesome to see this feature again ;) I was using it in the previous beta - now it is gone :<