3

While using lftp, it will log the file transfer to the ~/.lftp/transfer_log when xfer:log setting is set to "yes".

What will happen when there are two instances of lftp running at the same time? Will the log file be mixed up?

Is there a way to change where the log file will be write to?

Thanks.

Wei
  • 718
  • 1
  • 6
  • 18

2 Answers2

5

When multiple instances of lftp write to the same log file it can be mixed up (as current lftp 4.7.1 does not use file locking for the log file). At best the lines will be interleaved.

The setting xfer:log-file appeared in lftp version 4.2.0.

lav
  • 1,351
  • 9
  • 17
3

I don't know the answer to the first and second question, but for the third question:

set xfer:log-file "/path/to/your/file.log"
pepoluan
  • 6,132
  • 4
  • 46
  • 76
  • `xfer:log-file: no such variable. Use 'set -a' to look at all variables.` I have `LFTP | Version 4.0.9`, a bit outdated. – Putnik Oct 29 '13 at 17:54
  • well, the one I'm using is `LFTP | Version 4.3.3`, and doing a `set -a` from within lftp (or run `man lftp` followed by `/xfer:`) shows that `xfer:log-file` indeed exists... – pepoluan Nov 01 '13 at 04:35
  • you are both right. lftp version 4.0.9 does not have xfer:log-file, version 4.3.3 does – mcchiz Jun 18 '17 at 16:44