how to get the time in the log ?
hi
in my perl script I use : -------------------------------------------------------------------------------------------------- BEGIN { use CGI::Carp qw(carpout); my $errorlog = "/home/test/logs/errorlog.txt"; open(LOG, ">$errorlog") or die("Unable to open $errorlog: $!\n"); print LOG "Errors:\n"; carpout(*LOG); } to write the log of ftp transfer an get like: Net::FTP: Net::FTP(2.65) Net::FTP: Exporter(5.566) Net::FTP: Net::Cmd(2.21) Net::FTP: IO::Socket::INET(1.26) Net::FTP: IO::Socket(1.27) Net::FTP: IO::Handle(1.21) Net::FTP=GLOB(0x83c9c1c)<<< 220 szhstorage Microsoft FTP Service (Version 5.0). Net::FTP=GLOB(0x83c9c1c)>>> user anonymous Net::FTP=GLOB(0x83c9c1c)<<< 331 Anonymous access allowed, send identity (e-mail name) as password. Net::FTP=GLOB(0x83c9c1c)>>> PASS .... Net::FTP=GLOB(0x83c9c1c)<<< 230 Anonymous user logged in. Net::FTP=GLOB(0x83c9c1c)>>> PORT 192,168,0,1,131,37 Net::FTP=GLOB(0x83c9c1c)<<< 200 PORT command successful. Net::FTP=GLOB(0x83c9c1c)>>> STOR SSA100 Net::FTP=GLOB(0x83c9c1c)<<< 150 Opening ASCII mode data connection for SSA100 Net::FTP=GLOB(0x83c9c1c)<<< 226 Transfer complete. Net::FTP=GLOB(0x83c9c1c)>>> QUIT Net::FTP=GLOB(0x83c9c1c)<<< 221 Errors: -------------------------------------------------------------------------------------------------- but how to change it to get in the log the exact time ( date, hour and minutes ) for each line of ftp transfer ? kind regards cccc |
All times are GMT -5. The time now is 05:24 AM. |