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

Julian304

OK, debug for now then :)
martin

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.
Julian304

OK clear,

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

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

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.
martin

Thanks.
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.
Julian304

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" - https://winscp.net/forum/viewforum.php?f=13
martin

Re: .NET allows writing a custom logger

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

.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?