SmtpServer icon indicating copy to clipboard operation
SmtpServer copied to clipboard

ILogger interface depricated?

Open large opened this issue 4 years ago • 2 comments

Still working on my v9.x upgrade (coming from v7.x so this might be gone a long time) You had an .Logger option, is that removed / change?

A logger option could be good for debug info and others, I vote to include it into ServiceProvider.cs :) https://github.com/cosullivan/SmtpServer/blob/77d3188c8545c4e8ee39dca6fa3626d8f0d40512/Src/SmtpServer/ComponentModel/ServiceProvider.cs#L9

large avatar Jul 23 '21 17:07 large

Hi,

I removed the Logger in favor of using events, see the SessionTracingExample as an example of this. https://github.com/cosullivan/SmtpServer/blob/master/Examples/SampleApp/Examples/SessionTracingExample.cs

The logger (from memory) wasn't logging anything that isn't currently available from using events.

How were you using the logger previously? I am happy to put a logger back in if there are things that can't be determined via the events.

cosullivan avatar Jul 24 '21 13:07 cosullivan

Hi @cosullivan , I have checked and you are quite right 👍 I used the logger internally for debug reasons and it was never given any data from SmtpServer only the objects I included. Maybe remove the files for Logger interface the the NullLogger in a future release then?

large avatar Jul 24 '21 19:07 large

This has now been removed.

cosullivan avatar Oct 13 '23 03:10 cosullivan