Topic "Very large log files"

Author Message
hyamzy1

Guest


I'm using WinSCP to synchronize data to a remote location, there are 19 directories being synced with approximately 100 GB of data. The exact number of files is unknown but there is alot. My issue is that every night this task runs it creates a very large log file. It has been running for 12 hours and the log file is now 1.3 GB (this is too large to open with regular notepad). Is there anything I can do to stop it from growing so large?

I have a very similar script running that uses robocopy, the script has been running for 12 hours and the log file is only 17 MB in size.
Advertisements
hyamzy1

Guest


The log has now reached 1.5 GB.

The directory being backed up contains roughly 400,000 files and 120,000 folders.
hyamzy1

Guest


The script has finished, the log file is 1.7 GB and contains 16,502,007 lines of text. Does this seem normal?
Chau
[View user's profile]

Joined: 2015-01-13
Posts: 4
Location: VietNam, HoChiMinh City
Hi hyamzy1,
Sorry about my bad English.
I think when you set SessionLogPath, you would to add DateTime value into the logs's name to control it.
Then you can delete that log files any time you want (control this in your code or do it with a script automation)
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
Depending on protocol, the session log may include tens of lines per file. So 16 million lines for over half a million files and directories is not unimaginable. Note that the session log is intended for debugging. If you want to records operations only, consider using XML log.
https://winscp.net/eng/docs/logging_xml
_________________
Martin Prikryl
jdevrie

Guest


Very Happy Change your log level to normal in the log preferences and you will end up with a normal size logfile.
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