.NET assembly does not save the xml log file
Hello,
There is something I don't understand with .NET assembly and a powershell script.
Here is an excerpt of the said script:
If I set $session.SessionLogPath I get this in the $session.DebugLogPath:
If I don't set $session.SessionLogPath I get this in the $session.DebugLogPath:
But in either case "d:\SessionLogPath.xml" is never created. So what is the $session.SessionLogPath used for? I would have expected to have /xmllog="d:\SessionLogPath.xml" when I explicitely set it.
I would really like to keep the xml log file with all transfers because we have it too when we run WinSCP in interactive mode and we send it to Splunk for indexing.
Anyone manage to get an xml log file of the session when using the .NET Assembly?
Many thanks,
There is something I don't understand with .NET assembly and a powershell script.
Here is an excerpt of the said script:
# Set TXT assembly debug log to $session.DebugLogPath = "C:\temp\Visualcron\Powershell\DebugLogPath.txt" # Set XML transfer log files $session.SessionLogPath = "d:\SessionLogPath.xml" # Connect $session.Open($sessionOptions)
If I set $session.SessionLogPath I get this in the $session.DebugLogPath:
[2016-02-05 15:00:25.521Z] [003e] Starting "C:\Program Files (x86)\WinSCPautomation\winscp.exe" /xmllog="C:\Users\XX\AppData\Local\Temp\wscp1C70.00F34364.tmp" /xmlgroups /nointeractiveinput /dotnet=576 /ini=nul [color=green]/log="d:\SessionLogPath.xml"[/color] /console /consoleinstance=_7280_6920806_341
If I don't set $session.SessionLogPath I get this in the $session.DebugLogPath:
[2016-02-05 15:01:22.868Z] [0031] Starting "C:\Program Files (x86)\WinSCPautomation\winscp.exe" /xmllog="C:\Users\XX\AppData\Local\Temp\wscp1C70.00C12950.tmp" /xmlgroups /nointeractiveinput /dotnet=576 /ini=nul /console /consoleinstance=_7280_61436044_343
But in either case "d:\SessionLogPath.xml" is never created. So what is the $session.SessionLogPath used for? I would have expected to have /xmllog="d:\SessionLogPath.xml" when I explicitely set it.
I would really like to keep the xml log file with all transfers because we have it too when we run WinSCP in interactive mode and we send it to Splunk for indexing.
Anyone manage to get an xml log file of the session when using the .NET Assembly?
Many thanks,