--- Logging error ---Traceback (most recent call last):File "/usr/share/weewx/weewx/engine.py", line 188, in runfor packet in self.console.genLoopPackets():File "/usr/share/weewx/weewx/drivers/simulator.py", line 148, in genLoopPacketstime.sleep(sleep_time)KeyboardInterruptDuring handling of the above exception, another exception occurred:Traceback (most recent call last):File "/usr/lib64/python3.6/logging/handlers.py", line 936, in emitself.socket.send(msg)OSError: [Errno 9] Bad file descriptor
--
You received this message because you are subscribed to the Google Groups "weewx-development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-developm...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-development/bec06cb1-7b38-42e2-a99b-f5df871eba85%40googlegroups.com.
The default handler is SysLogHandler, which uses a socket to communicate with syslogd, but there are lots of other handlers.How about RotatingFileHandler? Instructions are in the WeeWX wiki. NB: there is a bug in the WeeWX logging facility that prevents this handler from working if you specify options maxBytes and backupCount. If you want to use RotatingFileHandler, either avoid these two options, or use the patched weeutil.logger module.
[Logging]version = 1disable_existing_loggers = True[[loggers]][[[root]]]# the trailing comma here seems required
handlers = console,[[handlers]][[[console]]]level = DEBUGformatter = verboseclass = logging.StreamHandler# Alternate choice is 'ext://sys.stderr'stream = ext://sys.stdout
--
You received this message because you are subscribed to the Google Groups "weewx-development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-developm...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-development/2e9d6f6b-9324-46b3-815b-f4dbde3f7df7%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "weewx-development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-developm...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-development/06d0bc13-ea81-463b-b512-59917006d4cb%40googlegroups.com.
Fair enough, but before I go implementing this... did it work? Did my workaround disable syslog thoroughly enough that you could get started?
--
You received this message because you are subscribed to the Google Groups "weewx-development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-developm...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-development/1811cab3-d5e8-40d5-a036-bcf5a07d81a0%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-de...@googlegroups.com.
What I had in mind was to trim the syslog handler out of the default weeutil.logger.LOGGING_STR, and, instead, put it in weewx.conf. You'd end up in the same place, but not without risk. The problem is that the installer would have to patch old weewx.conf files, inserting the syslog handler.
FWIW, I have been using phusion/baseimage as a base for my Docker builds and it pipes syslog to stdout by default - that works fine for me.That said, I think it would be better if weewx were to log to stdout by default since it is kind of the default for Unix/variants. Not depending on syslogd seems like a nice simplification of the runtime.
--
You received this message because you are subscribed to the Google Groups "weewx-development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-developm...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-development/3aea5121-69a6-436c-8ddf-f51636142de6%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-development/018C9240-38A2-4619-A96A-8E55C4C60CE0%40gmail.com.
The question I guess I have is why does weewx 'install' require a working syslog answering ? That seems wrong to me.This happens on installing via setup.py and installing packages. Guessing there's a call under the hood to weeutil/logger.py but I didn't dig into the gory details. If we could figure that out, then the normal runtime emit logging info gets more mainstream.
install should not require syslog (or any other) logging. deb/rpm just extracts assets from the .deb/.rpm. setup.py has an explicit import of 'log' from 'distutils' - not sure what logging mechanism that uses, but probably not syslog.configure does require logging, but probably should not. configuration is done by invoking wee_config, and that imports weeutil.logger.it should be possible to refactor wee_config and the code it uses so that there are no more weeutil.logger dependencies.
--
You received this message because you are subscribed to the Google Groups "weewx-development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-developm...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-development/ca24fbe5-09f7-4226-9410-b710394fb9f7%40googlegroups.com.
Commit 791de74.
--
You received this message because you are subscribed to the Google Groups "weewx-development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-developm...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-development/139534d9-1428-4f5b-b371-79c1d3120292%40googlegroups.com.