Topic "Change log level with command line parameter?"

Author Message
g24ftp
[View user's profile]

Joined: 2010-07-05
Posts: 18
Hello,

I have a problem with logging my file transfers.
I am using a batch-file where I execute the following script.
Code:

set WrkDir=C:\WinSCP
set BatchFile=%WrkDir%\Test.batch
set LogFile=%WrkDir%\Test.log

@echo>%BatchFile% option echo on
@echo>>%BatchFile% option batch abort
@echo>>%BatchFile% option confirm off
@echo>>%BatchFile% option reconnecttime off
@echo>>%BatchFile% option transfer binary
@echo>>%BatchFile% open User@123.123.123.123
@echo>>%BatchFile% ls
@echo>>%BatchFile% put Test.jpg
@echo>>%BatchFile% exit

"C:\WinSCP\winscp.com" /script=%BatchFile% /log=%LogFile%


Some time ago the log-files started to get pretty big, like 700mb log-file for a 170mb file.
So I perhaps the default log-level has changed.

So is there a special parameter or command to change the log-level for a transfer, I could use in this line:
Code:
winscp.com /script=%BatchFile% /log=%LogFile%

I am using version 5.1.4, but I tested this scenario with the newest version, too (5.1.7)
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
There's not such parameter.
See https://winscp.net/eng/docs/faq_script_ini
_________________
Martin Prikryl
g24ftp
[View user's profile]

Joined: 2010-07-05
Posts: 18
I changed this line as described here to set the log level to the lowest https://winscp.net/eng/docs/rawsettings
Code:
@echo>>%BatchFile% open User@123.123.123.123 -rawsettings LogProtocol=0

But it still uses the debug level 2 logging if that is set in the .ini.
If I understand the rawsetting function right it should overwrite the .ini settings. Is that correct?
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
No. The LogProtocol is not site setting. It's global. So you should follow the section for "Other Settings":
https://winscp.net/eng/docs/faq_script_ini
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