PiBrewing / craftbeerpi4

GNU General Public License v3.0
58 stars 28 forks source link

Hookable log data revisited #110

Closed prash3r closed 1 year ago

prash3r commented 1 year ago

resolves #60

for details please read #60 but here is a small summary:

The InfluxDB logging target is implemented like a plugin, somone who wants to implement a new sensor logging target can use this as a reference.

I tested this by creating an influxdb cloud config that was working on the current dev branch. then i checked out my branch and it worked without editing the config parameters. CSV files are created as intended as well.

this should be tested extensively before merging into master as it changes all logging. I am not usually working with influxdb, if you do and you run this and it is working or not then please report.

avollkopf commented 1 year ago

I will test it later this week and might adapt the config update slightly -> Text will be adapted with update to this version, but parameters will be kept like I changed it for a few other parameters recently

avollkopf commented 1 year ago

Did you also test, if csv log files can be deleted via the analytics page? This was an issue in the past as you had to remove the handler before you could delete the file: I added that prior deletion of the log files (log file controller 186 - 189). It is now removed.

prash3r commented 1 year ago

I added the mentioned lines again and tested it. I also had to change the CSV plugin to actually use the log_controllers handler dictionary self.cbpi.log.datalogger as it was previously creating its own. It should all be working now.