Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

Mari059 wrote:

My "logs" folder must not exceed 100mb. But I can't limit each log size file in it.

How can I do this, please ? I 'm little newbie on this work.

It will be possible to limit log size on WinSCP 5.10:
https://winscp.net/tracker/18
Mari059

Hi all,

I also need help to this.

My "logs" folder must not exceed 100mb. But I can't limit each log size file in it.

How can I do this, please ? I 'm little newbie on this work.
vanhauto

add max-size as parameter

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
ambam

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
martin

Re: I second the need for limiting log size option

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?
ctrunk514

I second the need for limiting log size option

I second the need for limiting log size option
allmoney.ws

Very wait this feature! Thanks!
martin

I'm raising priority of this request.
Guest

+1 I could really use this feature.
martin

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

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.
Matthijs

Re: limit log size

kfft wrote:

I confirm it would be very useful 8)


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

limit log size

I confirm it would be very useful 8)
Matthijs

Anyprogress on this?
Cawas

limit log file size

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?
martin

Re: limit log file size, command line, xp

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.
Srknt

Re: limit log file size, command line, xp

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

Re: limit log file size, command line, xp

This issue has been added to tracker.
jpratt

thank you
martin

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 :-)

Added to TODO list.
jpratt

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

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?
jpratt

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

Re: limit log file size, command line, xp

What that would be good for?
jpratt

limit log file size, command line, xp

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