Bug 10182 - Deleted file not shown in logfile (--log-file) unless out-format option is specified
Deleted file not shown in logfile (--log-file) unless out-format option is sp...
Status: RESOLVED FIXED
Product: rsync
Classification: Unclassified
Component: core
3.1.0
x64 Linux
: P5 normal
: ---
Assigned To: Wayne Davison
Rsync QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-04 17:37 UTC by Emanuele 'Lele' Calo' - End Point Corp.
Modified: 2013-11-28 19:17 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Emanuele 'Lele' Calo' - End Point Corp. 2013-10-04 17:37:22 UTC
Hello,
  I found a weird behavior where deleted files won't be reported in the logfile specified with "--log-file" option unless the "--out-format" (which is related to the *output format* as stated in the documentation) is specified.
  
  To reproduce the bug simply run:

### no format option
  mkdir tmp1 tmp2
  touch tmp1/test
  rsync -r --delete --log-file=transfer.log tmp1/ tmp2
  cat transfer.log 
# 2013/10/04 12:57:17 [20413] building file list
# 2013/10/04 12:57:17 [20413] >f+++++++++ test
# 2013/10/04 12:57:17 [20413] sent 76 bytes  received 32 bytes  total size 0
  rm transfer.log tmp1/test
  rsync -r --delete --log-file=transfer.log tmp1/ tmp2
  cat transfer.log 
# 2013/10/04 12:58:11 [20462] building file list
# 2013/10/04 12:58:11 [20462] sent 24 bytes  received 13 bytes  total size 0
  rm transfer.log 
  rmdir tmp1 tmp2

### out-format option
  mkdir tmp1 tmp2
  touch tmp1/test
  rsync -r --delete --log-file=transfer.log --out-format='%f' tmp1/ tmp2
# tmp1/test
  cat transfer.log
# 2013/10/04 12:59:54 [20593] building file list
# 2013/10/04 12:59:54 [20593] >f+++++++++ test
# 2013/10/04 12:59:54 [20593] sent 76 bytes  received 32 bytes  total size 0
  rm -f transfer.log tmp1/test
  rsync -r --delete --log-file=transfer.log --out-format='%f' tmp1/ tmp2
# deleting test
  cat transfer.log 
# 2013/10/04 13:21:44 [23552] building file list
# 2013/10/04 13:21:44 [23552] *deleting   test
# 2013/10/04 13:21:44 [23552] sent 24 bytes  received 13 bytes  total size 0
  rm -f transfer.log 
  rmdir tmp1 tmp2

### log-file-format
  mkdir tmp1 tmp2
  touch tmp1/test
  rsync -r --delete --log-file=transfer.log --log-file-format='%f' tmp1/ tmp2
  cat transfer.log 
# 2013/10/04 13:25:52 [23938] building file list
# 2013/10/04 13:25:52 [23938] tmp1/test
# 2013/10/04 13:25:52 [23938] sent 76 bytes  received 32 bytes  total size 0
  rm -f transfer.log tmp1/test
  rsync -r --delete --log-file=transfer.log --log-file-format='%f' tmp1/ tmp2
  cat transfer.log 
# 2013/10/04 13:26:39 [23988] building file list
# 2013/10/04 13:26:39 [23988] sent 24 bytes  received 13 bytes  total size 0
  rm -f transfer.log 
  rmdir tmp1 tmp2

All the previous tests were done on the following setups: 
* Centos servers 5 (rsync 3.0.6 - x86_64)
* Centos servers 6 (rsync 3.0.6 - x86_64)
* Linux Mint (rsync 3.0.9 - x86_64)
* ArchLinux (rsync 3.1.0 - x86_64).

Let me know if you need any other details.
Thank you
Comment 1 Emanuele 'Lele' Calo' - End Point Corp. 2013-10-08 17:45:31 UTC
*bump*
Comment 2 Wayne Davison 2013-10-27 16:28:22 UTC
Yeah, this is a very long-standing bug that causes delete messages to not get logged (even in a daemon log) unless some form of verbosity is in effect (most usually via -v).  I'm looking into that weird logic to see how best to ensure they don't get dropped.
Comment 3 Wayne Davison 2013-11-28 19:17:01 UTC
Fix committed to git for the next release.