I wrote a small script a while ago to anonymize log-files before posting them in public.
For it to work you need to provide a comma-separated table with strings to replace.
My-Fancy-Shared-Folder-Name1, FOLDER_01 My-Fancy-Shared-Folder-Name2, FOLDER_02 My-Fancy-Shared-Folder-Name3, FOLDER_03 QW123E-CV123E-TY123E-WW123U, ID-01 QAZS3E-CSD23E-ASD23E-QWEE3U, ID-02
redactLogs.sh syncthing.log cleanup_table.csv
After execution, all strings in the log file, matching the strings on the left in cleanup_table.csv table, will be replaced with the strings on the right in cleanup_table.csv
Cleaned-up file will be created:
Logs don’t contain any “super-personal” info, but I felt uncomfortable posting IPs, IDs, folder names, etc. when it’s not really necessary. So I wrote this for self-use.
Figured out, maybe others will find it helpful
redactLogs.sh (611 Bytes)