Post a reply

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

We will see, if more people ask for this.

Meanwhile – you know what method you are calling, right? So ignore the callbacks while you are calling the ListDirectory.
tattdogg

That's why I requested this feature
Can you at least add one more property to args object?
'from' or so...
so it will be possible to identify the method which log message came from
martin

No there's not.
tattdogg

Is there any way to identify from which method came args parameter?
martin

You can decide what you log in SessionOnOutputDataReceived, cannot you?
tattdogg

sorry. I meant our logs. we use OutputDataReceived
martin

So are you referring to a log file or to the OutputDataReceived?
tattdogg

I've tested this. It doesn't work
It still returns list of items...
WinSCP 5.18.2 beta
session.DebugLogLevel = -1;
session.OutputDataReceived += SessionOnOutputDataReceived;
...
private void SessionOnOutputDataReceived(object sender, OutputDataReceivedEventArgs args)
{
    Console.WriteLine("FTP: {0}", args.Data);
}
...
return session.ListDirectory(path)
martin

Re: [Feature request] Don't log ListDirectory items

Set "Reduced" logging level:
Session.DebugLogLevel = -1

You need WinSCP 5.18.1 beta for that though:
https://winscp.net/tracker/1936
tattdogg

[Feature request] Don't log ListDirectory items

Hi there

Is there any change to add one more feature to ListDirectory method?
Sometimes we have 50000+ files on the SFTP server
and when we call ListDirectory we receive 50000+ rows in log file
can we have something like this?
ListDirectory(string path, bool writeLog = true)