Topic "how to get WinSCP to log in XML format?"

Author Message
Walden

Guest


Hello all,

I've been spent half an hour - an hour of my life to find the answer to this question without any result, neither google, this site, or this forum gave me anything. The only result I got is that I feel really dumb, that I have to ask for this.

Maybe some words in the documentation, an example commandline wont hurt. All there is in the XML part is about the format. Nothing on how to initiate it.

Thanks for your attention.
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24555
Location: Prague, Czechia
Please read documentation. If that does not help, come back.

Make sure you use the latest version of WinSCP.
_________________
Martin Prikryl
Walden

Guest


Hi,

The documentation does not help indeed. Maybe you can show the part where it tells HOW to log in XML ? Smile

I only found out how to do it, because I was sure there's some kind of hint atleast on the page linked.

I have read the docs very carefully, but there's not a single line explaining that XML scripting has to be activated in the setup in the GUI. There's not a single line in the whole docs on how to activate XML logging.

It's pretty frustrating, as I needed this for scripting and I expected it can be invoked from the commandline, so I did not think for a milisecond that I should use the GUI, or look around in the GUI for such a setting. Naturally one would expect this is only doable from the commndline.


I think you should add something like "XML logging can be activated trough the settings/logging tab etc ". Both to the page you linked, and to the XML page.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24555
Location: Prague, Czechia
You can activate it from command-line, see documentation. The page I've posted before links to both ways of activating the logging (GUI and command-line). That's why I've posted it.
Walden

Guest


Well, maybe the problem is with me, but I could not find this myself, I'd suggest adding some links to the page explaining XML logging, because I have searched it there. thanks for your help!
Guest




In the documentation link it states that you can enable XML logging by adding .xml as the extension of the file you are logging with. Example /log=C:\MyLogFile.xml
ciove
[View user's profile]

Joined: 2011-06-22
Posts: 9
Hi,
You might be interested in my topic:
Create basic filelist using XML-logging and vbs script
Marty

Guest


When I try:
Code:
winscp.com /script-my.scr /xmllog=F:\mydir\log.xml

I do not get a log file.

How do you get an XML log???
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24555
Location: Prague, Czechia
Marty wrote:
When I try:
Code:
winscp.com /script-my.scr /xmllog=F:\mydir\log.xml

I do not get a log file.

How do you get an XML log???

Make sure you are using the latest version of WinSCP.
Mutos

Guest


Hi all,


Thanks for the information !

After reading and re-reading the documentation and the whole topic from the beginning to the end, and tested many ways to get a XML log, from direct command window, VBS, JS and PS, I finally found a working answer.

I finally succeeded with the /log and NOT the /xmllog parameter. In the documentation, it is said that it is deprecated and just maintains compatibility with older version.

As I did get the WinSCP from colleagues, I thought it to be the latest version. But when I checked, I found it to be 4.3.3 and on the site, the latest is 5.5.3. So I suppose the xmllog parameter was introduced after 4.3.3. Now I've downloaded 5.5.3 and as I can only check on a physicaly remote machine, I'll test it and keep you informed...
Mutos

Guest


Hi all,


Just a reply to signal the script now works as expected with /xmllog instead of /log in 5.5.3 ! Indeed I confirm your saying, prikryl : before trying anything else, make sure you use the latest version of WinSCP !!!!
Chau

Guest


Hi all,
Firstly, I'm sorry about my bad English.
I'm using winscpnet.dll for my project and when I want to view the xml log of winscp, I got this code:
session.XmlLogPath = @"C:\MyProject\MyLog.xml";
The result is nothing, pls help me for that.
I put that code before session.Open, and the version of winscp I'm using is 5.5.6
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24555
Location: Prague, Czechia
Chau wrote:
Hi all,
Firstly, I'm sorry about my bad English.
I'm using winscpnet.dll for my project and when I want to view the xml log of winscp, I got this code:
session.XmlLogPath = @"C:\MyProject\MyLog.xml";
The result is nothing, pls help me for that.
I put that code before session.Open, and the version of winscp I'm using is 5.5.6

The .NET assembly uses the XML log internally and deletes it when Session.Dispose is called.
Chau

Guest


prikryl wrote:
Chau wrote:
Hi all,
Firstly, I'm sorry about my bad English.
I'm using winscpnet.dll for my project and when I want to view the xml log of winscp, I got this code:
session.XmlLogPath = @"C:\MyProject\MyLog.xml";
The result is nothing, pls help me for that.
I put that code before session.Open, and the version of winscp I'm using is 5.5.6

The .NET assembly uses the XML log internally and deletes it when Session.Dispose is called.

Hi prikryl,
Thanks for your help!
I wonder how can I catch a xml logs file to trace status of my files after I do upload/download method?
Can you help me that? I'm coding assembly with C#.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24555
Location: Prague, Czechia
Chau wrote:
I wonder how can I catch a xml logs file to trace status of my files after I do upload/download method?
Can you help me that? I'm coding assembly with C#.

You generally do not need that.
Use information provided by TransferOperationResult returned by Session.PutFiles or Session.GetFiles:
http://winscp.net/eng/docs/library_transferoperationresult
Or subscribe Session.FileTransferred:
http://winscp.net/eng/docs/library_session_filetransferred
_________________
Martin Prikryl
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