High Speed Log4Net

Log4Net is a great logging extension for the .NET EcoSystem, that also supports .NET Standard / .NET Core (which you should be using if you arent). Unless you want to really read up on the framework extensively it can be easy to fall into some performance traps. I’ve found that in many cases these performance issues are caused by less-than-desirable appender configuration. For example lets say you have a FileAppender....

June 18, 2018 · 2 min · 245 words · WJD

Using Moq to override calls to App.config

The other day I was working on a new implementation in our product to re do logging. I’m taking us from a custom File Writer to using Log4Net wrapped in a Facade. To make this transition a bit smoother, and allow us to roll back to the old style if something breaks, I also implemented a Factory Pattern to provide the correct logger based upon the current App.Config settings. To clarify, we are using Ninject for DI, and usually I would use the DI container to inject the correct implementation....

June 18, 2018 · 3 min · 598 words · WJD