Topic "limit log file size, command line, xp"

Author Message
jpratt
[View user's profile]

Joined: 2007-10-31
Posts: 7
trying to figure out a way I can limit the size of the log file on a windows xp machine running WinSCP through command line

command line looks similar to this
"C:\Program Files\WinSCP3\WinSCP.exe" /log=logfile.txt /command "open user:pass@server.com" "get *.* c:\folder\" "exit"

thanks for your help
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
What that would be good for?
_________________
Martin Prikryl
jpratt
[View user's profile]

Joined: 2007-10-31
Posts: 7
it would be good because the log file is 6MB after one transfer, I am doing one transfer per day, and I would like to limit the size it can grow to.
I don't want to go in every week/month and delete the file.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
jpratt wrote:
it would be good because the log file is 6MB after one transfer, I am doing one transfer per day, and I would like to limit the size it can grow to.
I don't want to go in every week/month and delete the file.

So you want WinSCP to delete beginning of the log in case a total size exceed certain limit?
_________________
Martin Prikryl
jpratt
[View user's profile]

Joined: 2007-10-31
Posts: 7
not delete but limit the size it can grow to, so as it appends to the file it would remove older entries needed to keep the file size at or below the predetermined setting.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
jpratt wrote:
not delete but limit the size it can grow to, so as it appends to the file it would remove older entries needed to keep the file size at or below the predetermined setting.

That's what I've meant Smile

Added to TODO list.
jpratt
[View user's profile]

Joined: 2007-10-31
Posts: 7
thank you
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
This issue has been added to tracker.
_________________
Martin Prikryl
Srknt

Guest


Hi there,
Do you have solution for the above?
How to control log verbosity from command line? I don't want to use ini file with other 1000 options.
When I am using ini and have just logging section saved to it, it works fine but after script is run, it write all other options to ini file. That is the reason I dont want to use ini.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
Srknt wrote:

When I am using ini and have just logging section saved to it, it works fine but after script is run, it write all other options to ini file. That is the reason I dont want to use ini.

You can set the INI file read-only.
_________________
Martin Prikryl
Cawas

Guest


tracker issue contain no news, seems like this was never implemented.

don't know what you're talking about INI files.

couldn't find anything on docs (either on https://winscp.net/eng/docs/ui_pref_logging or https://winscp.net/eng/docs/logging for instance) on how to limit the file size.

and I doubt this can be properly done outside the app itself. can it? any pointers any one?
Matthijs

Guest


Anyprogress on this?
kfft

Guest


I confirm it would be very useful Cool
Matthijs

Guest


kfft wrote:
I confirm it would be very useful Cool


I can agree with this as well, or some option to rotate the logging.
Guest




Hi Guys,
Was there ever a solution to this? I would really like to purge/limit the log file on a nightly basis but can't see how.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
Quote:
Was there ever a solution to this? I would really like to purge/limit the log file on a nightly basis but can't see how.

There was no improvement in this respect yet.
Guest




+1 I could really use this feature.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
I'm raising priority of this request.
allmoney.ws
[View user's profile]

Joined: 2016-04-02
Posts: 1
Location: St. Petersburg, Russia
Very wait this feature! Thanks!
ctrunk514

Guest


I second the need for limiting log size option
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
ctrunk514 wrote:
I second the need for limiting log size option

Can you describe your use case? How big does your log file (for a single session) get that you need to limit its size?
ambam
[View user's profile]

Joined: 2016-07-13
Posts: 1
Location: US
I agree that this would be a nice feature.

Use Case:
Synchronizing directories on a production web server and offsite backup server nightly

After a single session, log file reach's 45MB
vanhauto

Guest


Is it not possible to use the following syntax?
WinSCP /log=logfile.txt /logsize=5MB /command "open user:pass@server.com" "get *.* c:\folder\" "exit"

If the filesize reaches 5MB, a new log-file (with datetime-suffix) will be created.

This way, we can use a daily transfer-script to transfer the old log-files to an archive.

+1 for higher priority
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