-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Logs are written to external SD-card #817
Comments
As far as I know, the log is written to the filesystem where the app is installed, so if you installed syncthing fork to the sd-card it writes onto it, instead of the internal memory. If that's the case, you should be able to move the app to the internal memory in android settings > apps. An option to select a path where the logfile should be stored isn't implemented in the app as far as I can see. |
I have not installed any app to the SD-card. I'm pretty sure that isn't even possible in Android versions newer than 4.x or so without any hacks. |
Hi, I understand your point but I've decided not to invest time on the log file path selector feature. To still make you feel better: If you have not enabled Syncthing debug options, the Syncthing log usually is a short consisting out of very little some log lines and therefore not harming your flash lifetime. What Android constantly writes (logs, sqlitedb's, etc.) is much more wearout, in my opinion. |
That's disappointing to read! Despite not having debugging enabled the logs were about 4 Mb though the way filesystems work any byte to be written causes a much bigger amount of actual writing. Android logs are at least written to internal storage which features wear leveling, which an SD-card does not. |
GitHub edit function not working in my browser it seems, though I just wanted to add that I'd even consider this issue a bug since it's highly unusual behaviour to have apps constantly writing logs to the SD-card. |
There is no constant writing. It's not the bug category. If you have too much log, something might be wrong, please show the log to let us investigate what causes a lot of Syncthing (error) activity. Turning the log off by default is a no-no because we need this info if things go wrong in upstream Syncthing(Native) to help the devs developing for Android compatibility. |
But why is it written to the sd-card? For me it is written to internal memory... |
Which storage paths exist on your device below /storage/ ? |
I got the following:
|
ok - no promise for a change - but I'll check the log wrapper code during my next dev session. |
Thanks! |
|
@j-romchain: I can only recommend to switch to using the original Syncthing app since that one doesn't constantly write to the SD-card and therefor your SD card's FAT filesystem will not become faulty as fast. |
My issue is that my sd card seems to be iffy, so when it tries to use it for logs it crashes, because the sdcard refuses to let it see the log. I could care less about my sdcards life, chances are ill be done with it or it'll break because of something else before I have to worry about flash wear. |
While flash wear is a thing it's not what I'm talking about in this issue. The issue is the FAT filesystem in use on Android's external SD cards. Tiny issues like your device doing an automatic reset will cause the FAT filesystem to be faulty when in that moment something was writing to it and Android does a filesystem check on boot but I never saw that have any positive effect since it doesn't correct FAT errors and still not mount it without write protection. It's just typical awful Android behaviour but that means it's important for apps like this Syncthing client to use the external SD unnecessarily. |
I have not had problems with sd corruption, but finishing my statement, it seems that the logs on sdcard was my problem... anyhow I am out, I am no longer going to follow around on my/ this problem until I get a bigger problem fixed that I brought up at the end of the issue I mentioned... it seems that my problem is solely my phone and or samsung, but this is related. |
1 similar comment
This comment has been minimized.
This comment has been minimized.
I'd kindly ask if anyone in here with the ability to test their phone rom/model has a snippet of pr code to fix the log path detection? My phone logs to internal storage, just fyi. |
@STPKITT Please test https://github.com/Catfriend1/syncthing-android/releases/tag/v1.19.1.1 and let me know if your issue is fixed. Thank you. |
Description of the issue
Hi, I'm running Syncthing-Fork version 1.16.0.6 installed from F-Droid on a Sony Xperia X running LineageOS 16.0 which is Android 9 based. I have a SD-card in the device to which I try to avoid any write operations while running Android to due to the awfully vulnerable FAT filesystem which Android demands for external SD-cards. When I put the SD-card into my PC today to copy some new music onto it Windows reported that the filesystem was corrupt and due to the Scandisk result with recovered file fragments I found out that Syncthing-Fork was writing log files to the SD-card. I then went into the app trying to find the corresponding option to disable any log writing (btw it wears out the hardware, too!) or at the very least target those write operations to the device's internal memory but I couldn't find one.
So unless I overlooked something in which case I'd highly appreciate a hint I request the feature of an option to configure log file writing. Thanks!
Version Information
The text was updated successfully, but these errors were encountered: