c84032002 has asked for the wisdom of the Perl Monks concerning the following question:

In sheepish self-defense let me say that I did try to find an answer on the web and in this forum. I'm converting a script that uses Expect into using NET::SFTP. The Expect version uses $exp->log_file("/dirname/filename.txt"); to get the session messages into a log file. How do I capture my session messages in the NET::SFTP script? Thanks, in advance, for your time & assistance.

Replies are listed 'Best First'.
Re: log_file in NET::SFTP?
by salva (Canon) on Jun 24, 2010 at 14:25 UTC
    How do I capture my session messages in the NET::SFTP script?

    Net::SFTP does not offer such feature but you can use something like Aspect to perform some action every time the operations you want to log are called.