Change log level with command line parameter?

Advertisement

g24ftp
Joined:
Posts:
18

Change log level with command line parameter?

Hello,

I have a problem with logging my file transfers.
I am using a batch-file where I execute the following script.
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:
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)

Reply with quote

Advertisement

g24ftp
Joined:
Posts:
18

I changed this line as described here to set the log level to the lowest https://winscp.net/eng/docs/rawsettings
@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?

Reply with quote

Advertisement

You can post new topics in this forum