November Happy Hour will be moved to Thursday December 5th.
AI OnAI Off
November Happy Hour will be moved to Thursday December 5th.
I would go with overload. Sometimes it's necessary to know what kind of exception was thrown or at what level it was.
You still have the type of the exception inside the scope of the messageFormat its just wrapped earlier then the Log method
But if they go for overloads they should also make some that dont require the TState object as that can be a bit confusing.
How can I access type of the exception if formatter would be another method? Like:
public string FormatErrorMessage() { .. } Log(Error, null, exc, FormatErrorMessage);
public string FormatErrorMessage(FormatException ex) { .. } Log(Error, null, exc, () => FormatErrorMessage(exc));
Hi
I have a suggestion to the new EPiServer.Logging beta
The new ILogger.Log method has the following signature:
Wouldn't it be better to have a simple signature like the following:
This would make it simpler to use and TState and TException is still accessible where the Log method is called: