Re: [weewx-user] Re: 4.x logging format

2021-09-22 Thread Doug Jenkins
Tom: Thanks for the hotfix! I do appreciate it such a quick turnaround on a small item like this! :) I switched the logging.py file at /usr/share/weewx/weeutil/ directory and tested it with both wee_reports and the standard weewx service. In both cases, Weewx formatted the log using my

Re: [weewx-user] Re: 4.x logging format

2021-09-22 Thread Tom Keffer
Hi, Doug I was able to replicate this. The problem is that ConfigObj, the utility that we use to read the configuration files, is trying to interpolate your 'format', rather than simply pass it on to the logging facility. Replace your version of logger.py with the attached. You should find it in

Re: [weewx-user] Re: 4.x logging format

2021-09-06 Thread Tom Keffer
It should be possible. Did you try it? What happened? On Sat, Sep 4, 2021 at 8:50 AM Doug Jenkins wrote: > Not to bring up old issues but, I am trying to format my logs. I read the > wiki attached to this thread and I have this configuration working in my > weewx.conf: > > # = LOGGING SETUP

Re: [weewx-user] Re: 4.x logging format

2021-09-04 Thread Doug Jenkins
Not to bring up old issues but, I am trying to format my logs. I read the wiki attached to this thread and I have this configuration working in my weewx.conf: # = LOGGING SETUP (Configured 09/04/2021) = [Logging]] [[root]] handlers = rotate, [[loggers]] [[handlers]]

Re: [weewx-user] Re: 4.x logging format

2020-05-03 Thread Tom Keffer
I like your fix better. Added in commit 6348741 . I also made the rotating log handler the default for MacOS. One problem I've discovered: if you 'declare' a handler, then the logging facility goes ahead and

Re: [weewx-user] Re: 4.x logging format

2020-05-03 Thread Graham Eddy
woops! i missed your reference to replacement weeutil/logger.py… putting that in place, it works fine on macos. it achieves the two things i was after: logs entries in a file (a basic function missing from weewx on macos for such a long time!), and allows customising message formats i have two

Re: [weewx-user] Re: 4.x logging format

2020-05-02 Thread Graham Eddy
simplified logging stanza doesn’t work and shows type conversion fix needed. details follow... using that simplified stanza in weewx.conf gives runtime error: File "/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/config.py", line 381, in resolve name =

Re: [weewx-user] Re: 4.x logging format

2020-05-02 Thread Tom Keffer
Great ideas! Thanks for your thoughts. Try this version of weeutil/logger.py. It includes a shim that does the proper type conversion before passing on arguments to logging.handlers.RotatingFileHandler. To use should be as simple as adding this to weewx.conf (alas, NOT TESTED): [Logging]

Re: [weewx-user] Re: 4.x logging format

2020-05-02 Thread Graham Eddy
i think we all agree that syslog on macos is a lost cause. the corollary is that pointing python logging at syslog (via logging.handlers.SysLogHandler) is doomed i accept that syslog works fine on most platforms, but it is not feasible for macos but there is the simple alternative for macos

Re: [weewx-user] Re: 4.x logging format

2020-05-02 Thread Tom Keffer
Logging from Python under MacOS High Sierra and later is a complete mystery. I have been unable to get it to work and, it seems, neither have other users