Disable Xml log to file in c#

Advertisement

shaancool
Joined:
Posts:
1
Location:
IN

Disable Xml log to file in c#

Is it possible to Disable "Xml log to file" programatically in c#, if so please guide me on the same (https://winscp.net/eng/docs/ui_pref_logging) I searched a lot but couldn't find any solution.
Thanks in advance :)

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
29,266
Location:
Prague, Czechia

Re: Disable Xml log to file in c#

No. Disable it in the GUI, before using the scripting interface.
Also, if you are using WinSCP from C#, you should better use WinSCP .NET assembly:
https://winscp.net/eng/docs/library
_________________
Martin Prikryl

Reply with quote

David Peters
Guest

Hi, I'd like to chime in on this topic. It would be very helpful to be able to disable the XML log from the .NET library.

My process goes through about 300000 files, uploading each. During testing I found that my program got slower and slower... via Visual Studio profiler and ILSpy I saw that most of the program's time was spent parsing the ever-growing XML file.

My solution is going to be to periodically dispose of my Session but this is obviously not the ideal approach. Thanks for your work on this very useful library, and I hope you consider this suggestion.

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
29,266
Location:
Prague, Czechia

David Peters wrote:

Hi, I'd like to chime in on this topic. It would be very helpful to be able to disable the XML log from the .NET library.

My process goes through about 300000 files, uploading each. During testing I found that my program got slower and slower... via Visual Studio profiler and ILSpy I saw that most of the program's time was spent parsing the ever-growing XML file.

My solution is going to be to periodically dispose of my Session but this is obviously not the ideal approach. Thanks for your work on this very useful library, and I hope you consider this suggestion.
Thanks for your feedback. I cannot "disable the XML log from the .NET library" as the XML log is a way WinSCP communicates back to the assembly. Though I understand your issue and will try to optimize WinSCP for this.
_________________
Martin Prikryl

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
29,266
Location:
Prague, Czechia

martin wrote:

Thanks for your feedback. I cannot "disable the XML log from the .NET library" as the XML log is a way WinSCP communicates back to the assembly. Though I understand your issue and will try to optimize WinSCP for this.
This issue has been added to the tracker:
https://winscp.net/tracker/1287

If you want to test it, please contact me.

Reply with quote

Advertisement

You can post new topics in this forum