in reply to To Log FTP Transfers.

Have you talked to your superior about the information that needs to be written to the log file?

If you do not already have a logging infrastructure, the easiest approach is to just open a file and write to it. See open and print.

As an alternative, there is Log::Log4Perl, which many people like.

I suggest writing the file size of the file before you transfer it, the source file name, the remote directory and file name and at the end of the transfer the file size as reported by the remote end.

Replies are listed 'Best First'.
Re^2: To Log FTP Transfers.
by hark-Tooth (Initiate) on May 08, 2014 at 07:04 UTC

    Thanks for your reply I have talked with my seniors they want log to be stored in "vsftpd" log format Thu Mar 4 08:12:30 2004 1 202.114.40.242 37 /incoming/index.html a _ o a guest@my.net ftp 0 * c
    1. Thu Mar 4 08:12:30 2004
    current-time
    2. 1
    transfer-time
    3. 202.114.40.242
    remote-host
    4. 37
    byte-count
    5. /incoming/index.html
    filename
    6. a
    transfer-type
    7. _
    special-action-flag
    8. o
    direction
    9. a
    access-mode
    10. guest@my.net
    username
    11. ftp
    service-name
    12 0
    authentication-method
    13 *
    authenticated-user-id
    14. c
    completion-status