Post a reply

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)


Topic review


OK, debug for now then :)

Julian304 wrote:

but the SessionLogReader is related to the Session log, isn't?

No it's not. It's a reader for an XML log.
A session log is not machine-readable.

OK clear,

but the SessionLogReader is related to the Session log, isn't? So we could (in the future) add the logging integration there.

No session log is a plain text (Session.SessionLogPath). The XML log is an internal thing, not exposed in any way.

The session log, it that the current XML log? Isn't that the SessionLogReader and that is also using the Logger?

Anyway, debug log for now is a good step.

Though that's for a debug log. You primarily wanted a session log. But that would be way more difficult as session log is actually produced by an internal WinSCP.exe process, not by any .NET code.

at least session log, but I think both is the best.

There are log levels already in WinSCP, we need to only translate them to NLog.

PS: I think I should have posted this in ".NET assembly / COM library" -

Re: .NET allows writing a custom logger

Are you referring to a debug log or a session log?

.NET allows writing a custom logger

We like integrate the logging of WinSCP to NLog.

Currently the Logger is an internal class without an interface. Also the `_writter` can't be set, so there is now way to integrate a custom logger (like NLog).

I would be nice if that would be possible, e.g. by exposing a log interface (e.g. ILogger) and let others assign the ILogger.

PS: if accepted, are pull requests accepted on Github?