~mzhang/garbage#7: 
Please make `garbage put -v` more useful

Neither garbage put, nor garbage put -v, produce any output:

$ date > test.txt
$ garbage put -v test.txt  # no output

On the other hand, garbage put -vv is excessively noisy:

$ date > test.txt
$ garbage put -vv test.txt
2022-11-02T10:47:15.293887Z  INFO garbage::ops::put: Chosen strategy. path="test.txt" strategy=MoveTo(TrashDir { path: "/tmp/.Trash-1000" })
2022-11-02T10:47:15.294100Z  INFO trash_dir{TrashDir { path: "/tmp/.Trash-1000" }}: garbage::ops::put::strategy: path_to_trashed_file="/tmp/.Trash-1000/files/1667386035293.test.txt"
2022-11-02T10:47:15.294127Z  INFO trash_dir{TrashDir { path: "/tmp/.Trash-1000" }}: garbage::ops::put::strategy: path_to_trash_info="/tmp/.Trash-1000/info/1667386035293.test.txt.trashinfo"
2022-11-02T10:47:15.294259Z  INFO trash_dir{TrashDir { path: "/tmp/.Trash-1000" }}: garbage::ops::put::strategy: Trash info: TrashInfo { path: "/tmp/test/test.txt", deletion_date: 2022-11-02T11:47:15.293973765+01:00, deleted_path: "/tmp/.Trash-1000/files/1667386035293.test.txt", info_path: "/tmp/.Trash-1000/info/1667386035293.test.txt.trashinfo" }
2022-11-02T10:47:15.294304Z  INFO trash_dir{TrashDir { path: "/tmp/.Trash-1000" }}: garbage::ops::put::strategy: Renaming file into trash directory. from="/tmp/test/test.txt" to="/tmp/.Trash-1000/files/1667386035293.test.txt" is_symlink=false

Could garbage put -v please produce useful output in the style of rm -v?

$ date > test.txt
$ rm -f test.txt
removed 'test.txt'

Thanks.

Status
RESOLVED FIXED
Submitter
~kas
Assigned to
Submitted
1 year, 6 months ago
Updated
1 year, 6 months ago
Labels
No labels applied.

~mzhang REPORTED FIXED 1 year, 6 months ago

Added a message for the single -v case in 29aceac. Thanks for noticing that!

~kas 1 year, 6 months ago

Looks great now, thanks!

Register here or Log in to comment, or comment via email.