separate log in interceptor Weewx extension

95 views
Skip to first unread message

sc.lep...@gmail.com

unread,
Dec 30, 2022, 3:10:24 PM12/30/22
to weewx-user

Hello
I ve seen when debug=1 in weewx.conf in main log there are this :


Dec 30 20:52:37 meteo-Ubuntu weewx-FROGGIT[1708329] DEBUG user.interceptor: raw packet: {'dateTime': 1672429957, 'usUnits': 1, 'rain_total': 0.32, 'barometer': 30.27, 'temperature_out': 56.6, 'humidity_out': 98.0, 'wind_speed': 3.1, 'wind_gust': 5.8, 'wind_dir': 146.0, 'dewpoint': 56.1, 'uv': 0.0, 'temperature_in': 67.2, 'humidity_in': 67.0, 'rain': 0.0} Dec 30 20:52:37 meteo-Ubuntu weewx-FROGGIT[1708329] DEBUG user.interceptor: mapped packet: {'dateTime': 1672429957, 'usUnits': 1, 'barometer': 30.27, 'outHumidity': 98.0, 'inHumidity': 67.0, 'outTemp': 56.6, 'inTemp': 67.2, 'windSpeed': 3.1, 'windGust': 5.8, 'windDir': 146.0, 'dewpoint': 56.1, 'rain': 0.0, 'UV': 0.0}

 
I want to separate this log to interceptor-weewx.log for example

I can use rsyslog.d to separate my logs but I dont know how to do this in interceptor.py

Can someone help me ?

Thanks
Stef

vince

unread,
Dec 30, 2022, 3:26:18 PM12/30/22
to weewx-user
Do it in rsyslog.d of course.

sc.lep...@gmail.com

unread,
Dec 30, 2022, 3:27:44 PM12/30/22
to weewx-user
Perhaps  yes but I  must put debug=1 to weewx config file to have theses lines ....
And I dont know how to do this  in source of interceptor.py  file  !

Can you help me ? 

vince

unread,
Dec 30, 2022, 5:09:10 PM12/30/22
to weewx-user
Edit weewx.conf and set debug=1
Then restart weewx

No reason to alter interceptor.py

sc.lep...@gmail.com

unread,
Jan 1, 2023, 2:45:45 PM1/1/23
to weewx-user
Hello 
It is not possible to  modify  interceptor.py  extension   ? to  log this  ? 
That's a shame no  ? 

vince

unread,
Jan 1, 2023, 3:30:50 PM1/1/23
to weewx-user
No.

I'm sorry, I think we have a translation problem perhaps.

If you want to do operating system things, use the operating system tools.  This is documented in https://github.com/weewx/weewx/wiki/logging 

Reply all
Reply to author
Forward
0 new messages