EPiserver uses Log4Net as its default error handler. The benefit of Log4Net for a developer is that you can also use it with very minimal configuration. Log4Net is a really simple and flexible error handling system which is far better to use instead of having to come up with a custom solution yourself, or, importing additional bloat from Nuge. All you have to do is enable it in the config, send your exception to Log4Net in your code and everything else is done for you.
To get start using Log4Net on your site First, in your webroot you will need to make a few tweaks to a file called 'EPiServerLog.config'. This is where all the logging configuration lives. At the end of that file you should see a section that looks similar to the below snippet. All you need to do to enable Log4Net on your site is to enable the appender ref so your config should look like this :
private static readonly ILog Logger = log4net.LogManager.GetLogger
public void Example()
catch (Exception ex)
Software Architect, Programmer and Technologist Jon Jones is founder and CEO of London-based tech firm Digital Prompt. He has been working in the field for nearly a decade, specializing in new technologies and technical solution research in the web business. A passionate blogger by heart , speaker & consultant from England.. always on the hunt for the next challenge