Thank you for advice but external SSD/USB is not an option. Unfortunately I 
can't send logs to other machine because I will install the station in 
remote place where web access is limited and I have limits for LTE transfer 
(transfer rate and volume of data). UPS supply is out of the question too. 
I got RPi outside and have to limit potential points of failure as much as 
possible.

I worked in IT for some time and of course I know that log tell you the 
truth (even if you don't want to know it). But I also think that 
it's entirely up to the user if he/she wants some service enabled/disabled 
or log created or not. With all pros and cons of this approach of course.

czwartek, 27 lipca 2023 o 12:33:17 UTC+2 Rainer Lang napisał(a):

> you are free to do whatever you want...
> You can even disable the rsyslog service completely and have no logging at 
> all.
> However, turning off logging is not a very smart approach, and thinking 
> you can turn logging on again "when it's needed" is imho rather naive 
> thinking. When an application (and it may even fail to restart) fails, you 
> may no longer be able to find out what has caused the issue without logs.
> You can use RAM (temporary file system) as suggested by @vince, you can 
> move the logs to a remote server (e.g. NAS) etc., but switching off logging 
> completely is nothing a professional IT person would recommend
>
> you could also use a SSD disk instead of a microSD with your RPi or a SLC 
> microSD card if you want to avoid wear out of your SD card ...
> I'm using both approaches for years now with my RPi's - and have my logs 
> available in case they are needed 😎
> On 27.07.2023 12:18, Tomasz Lewicki wrote:
>
> Thank you. I'm using log2ram so I think it has the same effect. But I 
> think that some mechanism to completely turn off logging does/should exist. 
> I can always turn it on if needed. 
>
>  I don't know if it is good approach but I've used 
> "disable_existing_loggers = True" directive in weewx.conf and log aren't 
> generated - or I can't find them :)
>
> środa, 26 lipca 2023 o 17:50:53 UTC+2 vince napisał(a):
>
>> I just log to tmpfs (essentially ramdisk) and it is not an issue for me. 
>>
>> Add this to your /etc/fstab and reboot
>>
>> #---- put logs and tmp dirs in ramdisk ---
>> tmpfs           /tmp            tmpfs   
>> defaults,nosuid,mode=0755,nodev,noatime   0       0
>> tmpfs           /var/log        tmpfs   
>> defaults,nosuid,mode=0755,nodev,noatime   0       0
>> tmpfs           /var/tmp        tmpfs   
>> defaults,nosuid,mode=0755,nodev,noatime   0       0
>> #---------------------------------------------
>>
>> Note that the result here is that you will lose 'all' logs when you 
>> reboot, but the upside is it never writes to SD card.  In this 
>> configuration your pi SD is close to read-only.
>>
>>
>> On Wednesday, July 26, 2023 at 2:40:26 AM UTC-7 Tomasz Lewicki wrote:
>>
>>> Hi WX users.
>>>
>>> I'd like to ask about logging in Weewx (I'm using version 4.10.2). To 
>>> make a long story short, I'd like to completely turn off logging by Weewx - 
>>> because I'm using Raspberry Pi with SD card and want to minimize write 
>>> operations as much as possible. 
>>>
>>> I've read article on wiki (
>>> https://github.com/weewx/weewx/wiki/WeeWX-v4-and-logging) but do not 
>>> clearly understand new way of control logging. I'd like to have simple 
>>> switch in weewx.conf, for example "completely_disable_logging = True" or 
>>> something similar. Is there some switch in [Logging] block as I see it in 
>>> wiki? If I change "disable_existing_loggers = False" to 
>>> "disable_existing_loggers = True", will I get the expected effect?
>>>
>> -- 
> 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/9812f2ab-5ffb-4e64-bd97-80358501cf5bn%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/weewx-user/9812f2ab-5ffb-4e64-bd97-80358501cf5bn%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
>

-- 
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/f32ced07-ea6b-4c58-9448-67aabaef3134n%40googlegroups.com.

Reply via email to