Editorials, Encryption/Data Security, Townsend Security

Newest Log4Net Release is Dot Net 4.0 Compliant

Newest Log4Net Release is Dot Net 4.0 Compliant
Logging is an integral part of any application. The developers of Log4Net have created a fantastic infrastructure for logging. What really makes it cool is:

  • It is configuration driven – ie. you can change the way it works by making changes in your configuration rather than your code.
  • You can have it monitor the configuration so that you can change how you want it to operate without having to re-start your program
  • It has multiple logging sources which are also configuration driven supporting log sources through log appenders to destinations such as MSMQ, SQL, file, rolling file, drop directories, trace, windows events, SMTP, UDP, console and even a colored console, just to name a few.
  • Additionally, you can readily write your own appender for custom requirements. Maybe you need to log to SNMP, a Web Service or a WCF endpoint.

One of the biggest complaints has been that a popular appender, SMTP, only worked with the Dot Net 2.0 framework. With the latest release of Log4Net this restriction is now gone. It takes a little work to understand how everything is put together, and how it interacts. I found a good blog on the topic at http://www.beefycode.com. Search for Log4Net on the site.

In typical Microsoft Fashion, they put out a clone of Log4Net in the form of the Simple Logging Framework, with three appenders. Additionally, it is not configuration driven meaning changes to how the logging is directed and/or formatted require changes to your code. But the interfaces and methods are almost identical.

Since Log4Net is open system code, I’m not sure I would look into the Simply Logging Framework until it matures a lot more.
A wise developer would create their own logging interface, encapsulating the logging requirements so that they can substitute a new logging infrastructure easily.

When it comes to application error handling, event messaging, debugging, performance monitoring, etc. Log4Net is hard to beat.

Do you have a logging library or framework you have found effective? I don’t get to do much work in the Java world, so I don’t have time to dig, or much practical exposure there. Why not share with our readers those tools you have found effective in other infrastructures, or even in Dot Net? Are there techniques you have found effective in tablets or smart phones? Drop me a note at btaylor@sswug.org.

Cheers,

Ben

$$SWYNK$$

Featured Article(s)
Avoiding Bachelor Programming Syndrome
Unless you plan for, and issue regular COMMITs in your DB2 batch programs, you will cause locking problems for your DB2 environment.

Featured White Paper(s)
Encryption & Key Management for Microsoft SQL Server 2008
Written by Townsend Security

Simplify encryption and key management on … (read more)