in reply to To Log FTP Transfers.
Hello hark-Tooth, and welcome to the Monastery!
First, you need a logging mechanism. You could roll your own, but there are many options available on : Log::Minimal, Log::Lite, Log::Log4perl, etc.
Next, you need a way to call your logging mechanism on each transfer operation (assuming you need this level of detail in your log). Fortunately, Net::SFTP provides callback hooks for its get and put methods, so you just need to write a small callback subroutine which invokes the logger, and pass in a reference to this sub when you invoke the get or put method.
As the number of file transfers is “huge,” you will want to configure the logger to rotate the log file fairly regularly.
Hope that helps,
| Athanasius <°(((>< contra mundum | Iustus alius egestas vitae, eros Piratica, |
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: To Log FTP Transfers.
by hark-Tooth (Initiate) on May 08, 2014 at 07:11 UTC | |
by Corion (Patriarch) on May 08, 2014 at 07:14 UTC |