Should I be using 开发者_运维问答the ILog or ILogger interface? I find the ILog interface to be easier to use since I can just declare one instance per class by calling:
private ILog _logger = LogManager.GetLogger(typeof(MyClass));
It's a much simpler interface then the ILogger:
void Log(Type callerStackBoundaryDeclaringType, Level level, object message, Exception exception)
Is there a difference? When is it better to use 1 vs the other?
I recommend the ILog
interface. This has been pushed by Apache/Common Logging. If you use the common logging interface, then most logging systems can be plugged into your application.
I find log4net to be more than adequate.
精彩评论