.NET allows writing a custom logger

Advertisement

Julian304
Joined:
Posts:
10
Location:
Netherlands

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

Reply with quote

Advertisement

Advertisement

martin
Site Admin
martin avatar

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.

Reply with quote

martin
Site Admin
martin avatar

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

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,518
Location:
Prague, Czechia

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.

Reply with quote

Advertisement

You can post new topics in this forum