Topic "Date/Timestamps In Log File"

Author Message
johnmsch
[View user's profile]

Joined: 2017-01-05
Posts: 9
Location: Atlanta
Requesting an option to add a date/time stamp in the output log.

2017-02-01 16:30:10 Connecting to host...
2017-02-01 16:30:10 Authenticating...
2017-02-01 16:30:12 Authenticated.
2017-02-01 16:30:12 Starting the session...
2017-02-01 16:30:12 Session started.
2017-02-01 16:30:12 Active session: [1] uuuu@files.xxxx.net
2017-02-01 16:30:12 Comparing...
2017-02-01 16:30:40 Local 'C:\downloads\webdav\Formulary\yyy' <= Remote '/webdav/Formulary/yyy'
2017-02-01 16:30:40 Synchronizing...
2017-02-01 16:30:40 Local 'C:\downloads\webdav\Formulary\yyy\AAA' <= Remote '/webdav/Formulary/yyy/AAA'
2017-02-01 16:30:42 DS10401 | 37 KB | 953.7 KB/s | binary | 100%
2017-02-01 16:30:44 DS10402 | 37 KB | 652.5 KB/s | binary | 100%
2017-02-01 16:30:46 DS10992 | 36 KB | 595.8 KB/s | binary | 100%
2017-02-01 16:30:48 DS11138 | 38 KB | 570.6 KB/s | binary | 100%
2017-02-01 16:30:50 DS11139 | 37 KB | 573.5 KB/s | binary | 100%

I'm guessing this would be something like an optional command line switch, like this:
WinSCP.com /script=C:\Script.txt /timestamp > C:\Log.txt
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 26331
Location: Prague, Czechia
Why don't you just use a real session log? It includes timestamps, and everything that console output does. Use the /log=C:\log.txt.

https://winscp.net/eng/docs/logging
https://winscp.net/eng/docs/commandline#logging
_________________
Martin Prikryl
johnmsch
[View user's profile]

Joined: 2017-01-05
Posts: 9
Location: Atlanta
Thanks Martin, I initially tried using the /log option, but that just gives WAY too much detail. After lots of testing, I found that all I needed was to redirect the output of the program like this:

"C:\Program Files (x86)\WinSCP\WinSCP.com" /script=C:\Work\TestScript.txt > C:\Work\TestScript.log

That gives me just the list of the files that were synched. Since this runs as a scheduled task, I wanted a way to check the results of the sync and not have to wade through that huge log file. It would just be nice to see the timings on each file synched.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 26331
Location: Prague, Czechia
Consider an XML log:
https://winscp.net/eng/docs/logging_xml
johnmsch
[View user's profile]

Joined: 2017-01-05
Posts: 9
Location: Atlanta
Yep, tried that also. Again, too verbose.

Thanks anyway. Still very impressed with this tool!
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License