Skip to content
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

Generate error log in real time? #233

Open
swswsws583 opened this issue Mar 14, 2024 · 1 comment
Open

Generate error log in real time? #233

swswsws583 opened this issue Mar 14, 2024 · 1 comment

Comments

@swswsws583
Copy link

Hi, is there a way I can know what file(s) is/are shown as error in the output box? Is it possible to automatically generate a log of errors with the location path specified as the transfer goes on? Thanks!

What I can see in the output box now:
Errors: 1 (retrying may help)

@Gussak
Copy link

Gussak commented Apr 24, 2024

Hi! I find it difficult to see what is going on too, so I implemented this for linux (you may be able to patch it and run it in cygwin too if you need).
Your specific request can be a filter in the while loop in the end, I havent seen it happen before so I would need some log to implement it.

cat >rcloneLogMakeReadable.sh; chmod +x rcloneLogMakeReadable.sh; ./rcloneLogMakeReadable.sh

#!/bin/bash

clear;

#read -p "paste rclone log at /tmp/rclone.log"

strCmd='/usr/bin/rclone copy --update --verbose --transfers 4 --checkers 8 --contimeout 60s --timeout 300s --retries 3 --low-level-retries 10 --stats 1s --stats-file-name-length 0 --fast-list "/'"$HOME"'/Google Drive/" remote:rclone/ 2>&1 |tee /tmp/rclone.log'
echo "$strCmd"

echo "running the above command (that was copied from a job from rclone-browser) in gnome-terminal"
gnome-terminal -- bash -c "$strCmd;read -p exit"

while true;do
	clear
	cat /tmp/rclone.log |egrep "^.*INFO  :" |egrep -v ".*: $" |sort
	cat /tmp/rclone.log |egrep "^ [*] " |tail -n 1
	sleep 1
done

output ex.:

2024/04/23 22:04:06 INFO  : somepath/somefile.txt: Updated modification time in destination
2024/04/23 22:04:07 INFO  : somepath2/somefile2.txt: Copied (replaced existing)
 * somepath3/somefile3.txt:100% /21.021Mi, 1.454Mi/s, 0s

PS.: The above log filter could be an alternative console log box inside rclone-browser, would be nice!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants