Mark: It is worth a shot and most likely it would work. If it does, I would recommend forking the repo and make the same changes for log.error, log.message, and log.debug using the functions from weeutil.logger.
Then I would commit the changes to your fork and send the maintainer a pull request to make the changes in the regular driver. DDJ On Mon, May 23, 2022 at 9:59 AM Mark Fraser <[email protected]> wrote: > On 23/05/2022 11:54, Doug Jenkins wrote: > > Mark: > > > > I would add the log_success = False under the BME280 driver in your > > weewx.conf. If that doesn't work, then check with the driver's author to > > see if the code can be revised to accommodate WeeWx logging class. > > > > On Mon, May 23, 2022 at 4:02 AM Mark Fraser <[email protected] > > <mailto:[email protected]>> wrote: > > > > I'm running version 4.8 of weewx and although I've got > > log_success = False > > In all places in weewx.conf, I still see lines like: > > May 23 09:00:56 weathercam /weewxd: bme280: BME280 data > > compensated_reading(id=a4ff8186-9fd7-4cb1-ac00-22716b358662, > > timestamp=2022-05-23 09:00:56.543049, temp=34.843 °C, pressure=996.53 > > hPa, humidity=17.31 % rH) > > May 23 09:00:56 weathercam /weewxd: bme280: {'windGust': 3.672, > > 'outBatteryStatus': 0, 'rain_total': 42.06, 'windSpeed': 2.448, > > 'windDir': 270.0, 'outHumidity': 70.0, 'outTemp': 16.0, 'dateTime': > > 1653292852, 'usUnits': 16, 'rain': 0.0, 'pressure': > 996.5324701184883} > > In /var/log/syslog. > > > > Is there any way of stopping these messages too? > > Looks like it has already been asked for: > https://gitlab.com/wjcarpenter/bme280wx/-/issues/1 > > and it seems to be using it's own logging functions: > > def logmsg(level, msg): > syslog.syslog(level, 'bme280: %s' % msg) > > def logdbg(msg): > logmsg(syslog.LOG_DEBUG, msg) > > def loginf(msg): > logmsg(syslog.LOG_INFO, msg) > > def logerr(msg): > logmsg(syslog.LOG_ERR, msg) > > > If I replace these with: > import weeutil.logger > and change instances of loginf() with log.info() is it likely to work? > > -- > You received this message because you are subscribed to the Google Groups > "weewx-user" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/weewx-user/f3d06f4b-511a-671f-d708-c87c0398aa1d%40gmail.com > . > -- You received this message because you are subscribed to the Google Groups "weewx-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/CACC0i0xu2uRO_hX_-%2BtEJAX64mB5GH6jhexD0SAbH456xL3RDA%40mail.gmail.com.
