Very large log files

Advertisement

hyamzy1
Guest

Very large log files

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.

Reply with quote

Advertisement

hyamzy1
Guest

Very large log files

The log has now reached 1.5 GB.

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

Reply with quote

hyamzy1
Guest

Very large log files

The script has finished, the log file is 1.7 GB and contains 16,502,007 lines of text. Does this seem normal?

Reply with quote

Chau
Joined:
Posts:
4
Location:
VietNam, HoChiMinh City

Re: Very large logs file

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)

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
40,476
Location:
Prague, Czechia

Re: Very large log files

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
Edit 2021: Or use Reduced logging level with the regular session log file.

Reply with quote

Advertisement

jdevrie
Guest

Change the log level to normal

:D Change your log level to normal in the log preferences and you will end up with a normal size logfile.

Reply with quote

tov
Guest

Jams Win7 down to 0 byte free on disk C: state by log file size *5 of what it needs to "upload"

While trying to copying ('uploading') 6Gb file, WinSCP (5.11.1-3) created logs (in C:\Users\<user>\AppData\Local\Temp) about 50Gb! after copying just of half of the ^Gb chunk of file, so it not just blocked all the "uploading" in WinSCP (resulting in non-writable disk C: with 0 byte free), but just jammed my Windows 7 completely.
What are U doing guys?

Reply with quote

Advertisement

You can post new topics in this forum