This repository is the sample code developed in the log4net training video Application Logging in C#: The log4net tutorial. The commits in the repository have been tagged with versions that correspond to the sections of the video where that particular code was built. Below you will see what each section covers.
In this section, we start from scratch and implement logging using log4net. There isn't any complicated usage. Think of this as a step up from a simple Hello World example.
This is a brief look at how the changes in .NET 4.5 allow us more options for automatically naming our logger instance based upon the file it was created in.
This section is all about the appenders. Where can we write data to and how do we do it for each. The major appenders are covered and the minor ones are touched upon.
In this section we look at how to use a filter to get only the messages you are really interested in logging. We cover the various options for being as specific as we want about the messages we capture.
This section is designed to show you what information you can capture using the standard options provided by log4net and how you can play around with those formats for even more flexibility.
In this last section, we look at how to extend the information we can capture by providing our own custom properties. First we look at a simple variable that gets set once and does not change. After that, we look at how to add a variable once and get it to change as the value in our application changes.
- The training video itself: Application Logging in C#: The log4net tutorial
- The article it supplements: http://www.codeproject.com/Articles/140911/log-net-Tutorial
- The log4net homepage: http://logging.apache.org/log4net/
Note: To be informed when new training resources are coming and to participate in shaping what new training resources are provided by Tim, sign up for the training announcements newsletter at http://eepurl.com/btLrsH