As indicated in the documentation, --log-file is supposed to override the "log file" directive in daemon mode. I'm seeing some odd behavior regarding this... it appears that while startup and connect information is written to the command-line log, the transfer information is still written to the rsyncd.conf log file. All tests are done with rsync 3.0.5, and have been tested with 2.6.6 as well.

rsyncd.conf:

 log file = logs/rsyncd_conf_log_file
 transfer logging = yes

 [foo]
   path = src
   use chroot = false

Reproduced:

 $ mkdir /tmp/rsync
 $ cd /tmp/rsync
 $ mkdir src dest logs
 $ touch src/{a,b,c}
$ rsync --daemon --config=rsyncd.conf --log-file=logs/command_line_log --port=8080
 $ rsync -a --port=8080 localhost::foo/ ./dest/
 $ cat logs/command_line_log
2009/02/18 13:52:08 [5698] rsyncd version 3.0.5 starting, listening on port 8080
2009/02/18 13:52:10 [5714] connect from localhost (127.0.0.1)
 $ cat logs/rsyncd_conf_log_file
2009/02/18 13:52:10 [5714] rsync on foo/ from localhost (127.0.0.1)
2009/02/18 13:52:11 [5714] building file list
2009/02/18 13:52:11 [5714] send localhost [127.0.0.1] foo () a 0
2009/02/18 13:52:11 [5714] send localhost [127.0.0.1] foo () b 0
2009/02/18 13:52:11 [5714] send localhost [127.0.0.1] foo () c 0
2009/02/18 13:52:11 [5714] sent 223 bytes  received 86 bytes  total size 0

Additionally, when the "log file" line is removed completely from rsyncd.conf, I still don't get all of the information in the command line log... it goes to syslog. Running the same commands above:

 $ cat logs/command_line_log
2009/02/18 13:55:12 [6634] rsyncd version 3.0.5 starting, listening on port 8080
2009/02/18 13:55:16 [6657] connect from localhost (127.0.0.1)
 $ tail /var/log/messages
Feb 18 13:55:16  rsyncd[6657]: rsync on foo/ from localhost (127.0.0.1)
Feb 18 13:55:16  rsyncd[6657]: building file list
Feb 18 13:55:16  rsyncd[6657]: send localhost [127.0.0.1] foo () a 0
Feb 18 13:55:16  rsyncd[6657]: send localhost [127.0.0.1] foo () b 0
Feb 18 13:55:16  rsyncd[6657]: send localhost [127.0.0.1] foo () c 0
Feb 18 13:55:16 rsyncd[6657]: sent 223 bytes received 86 bytes total size 0

Is there something I'm missing, or is there another way to get everything to go to the log file specified on the command line?

Thanks,
-John
--
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html

Reply via email to