norberts1 / hometop_HT3

Pimp your heater.
GNU General Public License v3.0
39 stars 19 forks source link

2 Logfiles are not located in log folder #27

Closed NilsRo closed 11 months ago

NilsRo commented 1 year ago

Describe the bug I setup an read-only filesystem and used HT3 to send MQTT messages. For this I had to put var/log and var/run to a tmpfs. During investigation why it is not running fine I found 2 logfiles still not created in the logs folder. cdata.log and cdb_rrdtool.log. solved this via symlinks but it should be moved to log folder also. (a rsyslog integration would be nice also ;-) )

To Reproduce Steps to reproduce the behavior:

  1. Go to folder HT3/sw
  2. See logfiles

Expected behavior All logfiles should be located in the log folder or provided in the central log via rsyslog https://gist.github.com/danielkraic/a1657f19bad9c158cbf9532e1ed1503b

Additional context Avoids broken SD Cards, etc.

norberts1 commented 1 year ago

cdata.log and cdb_rrdtool.log are created as defaults on startup (if yet no logfile-names are available). Normally they have no content if the configuration-file reading is successful.

So my fix will be to place this files into the temp-folder.

(a rsyslog integration would be nice also ;-)

I'll check this rsyslog enhancement. Should be configurable as an option.

NilsRo commented 11 months ago

Works flawlessly