NLog, Elmah + shared library
问题 I am trying to come up with a way to create a common library for all my MVC projects. I started off really simple with BaseController and BaseModel classes. Easy stuff! Now in my projects I would like to either use Elmah or NLog for logging exceptions and/or tracing info. Can anyone give me some ideas on the best practices for writing a common library to support both? 回答1: I would use NLog as base for your logging. I've created a small target for NLog which could be used to route exceptions