Ok, should be easy, try changing line 131 from:

self.dbm.addRecord(packet)

to

self.dbm.addRecord(packet, log_level=syslog.LOG_DEBUG)

That will still log the add record but only when debug=1. Usual restart etc.

Gary

On Sunday, 26 August 2018 17:08:57 UTC+10, Andrew Milner wrote:
>
> this is my raw.py - it is actually raw_0.4.3-lh.py
>
>
>
> On Sunday, 26 August 2018 09:56:36 UTC+3, gjr80 wrote:
>>
>> Ok, had a look, I think it should be fairly easy to modify raw.py to use 
>> the log level parameter that the addRecord method in the Manager class in 
>> manager.py supports. At least that way you have only modified mesowx and 
>> not WeeWX so your changes are safe from WeeWX upgrades. Can you please 
>> post/email a copy of your raw.py; seems there are multiple versions getting 
>> around.
>>
>> Gary
>>
>> On Sunday, 26 August 2018 14:21:54 UTC+10, Andrew Milner wrote:
>>>
>>> no rush - cos the bastardised change fixed the immediate problem in a 
>>> very crude manner, but a better method would be appreciated!!
>>>
>>>
>>>
>>> On Sunday, 26 August 2018 07:06:54 UTC+3, gjr80 wrote:
>>>>
>>>> Ok, will have a look later and see what I can figure out.
>>>>
>>>> Gary
>>>>
>>>> On Sunday, 26 August 2018 14:04:14 UTC+10, Andrew Milner wrote:
>>>>>
>>>>> Hi Gary
>>>>> Yes, it uses the weewx manager.  I am afraid that the concepts of 
>>>>> classes and subclasses are beyond my comprehension.  I have bastardised 
>>>>> weewx by editing manager.py to only log a message if database is NOT 
>>>>> mesowx, which has at least stopped the log being overrun with 2 second 
>>>>> record add entries!!
>>>>> I would prefer a better method though, since obviously I need to 
>>>>> remember this edit with any weewx upgrades in the future.
>>>>>
>>>>>
>>>>>
>>>>> On Sunday, 26 August 2018 06:59:13 UTC+3, gjr80 wrote:
>>>>>>
>>>>>> Andrew,
>>>>>>
>>>>>> Not familiar with mesowx raw service, is it using the Manager class 
>>>>>> in manager.py to add records using its addRecord method? If so the 
>>>>>> addRecord method supports changing the log level it uses, but it appears 
>>>>>> that WeeWX does not give the user the ability to change this log level 
>>>>>> without editing the WeeWX code. That being said, in in a vanilla WeeWX 
>>>>>> install it would be very easy to subclass StdArchive to make use of this 
>>>>>> ability to change the log level. As for mesowx that really depends on 
>>>>>> how 
>>>>>> mesowx is structured/operates, it may be just as simple, it may not. Can 
>>>>>> you post the offending log entries, that will give me an idea. Tied up 
>>>>>> otherwise this arvo but can have a dig through mesowx later.
>>>>>>
>>>>>> Gary
>>>>>>
>>>>>> On Sunday, 26 August 2018 13:47:17 UTC+10, Andrew Milner wrote:
>>>>>>>
>>>>>>> Is there a way to stop log messages from manager when records are 
>>>>>>> added to a database?  The mesowx raw service seems to log every loop 
>>>>>>> record 
>>>>>>> added to the loop database - and whilst this was never a problem with a 
>>>>>>> FO 
>>>>>>> station and a loop record every 53 seconds, it is a huge logging 
>>>>>>> overhead 
>>>>>>> with my new VP2 and 2 second loop intervals!!!!!!
>>>>>>>
>>>>>>

-- 
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].
For more options, visit https://groups.google.com/d/optout.

Reply via email to