The Apache log4net library is a tool to help the programmer output log statements to a variety of output targets. log4net is a port of the excellent Apache log4j™ framework to the Microsoft® .NET runtime. We have kept the framework similar in spirit to the original log4j while taking advantage of new features in the .NET runtime.
Apache log4net is a tool to help the programmer output log statements to a variety of output targets. In case of problems with an application, it is helpful to enable logging so that the problem can be located. With log4net it is possible to enable logging at runtime without modifying the application binary. The log4net package is designed so that log statements can remain in shipped code without incurring a high performance cost. It follows that the speed of logging (or rather not logging) is crucial.
At the same time, log output can be so voluminous that it quickly becomes overwhelming. One of the distinctive features of log4net is the notion of hierarchical loggers. Using these loggers it is possible to selectively control which log statements are output at arbitrary granularity.
log4net is designed with two distinct goals in mind: speed and flexibility.
Features:
- Support for multiple frameworks
- Output to multiple logging targets
- Hierarchical logging architecture
- XML Configuration
- Dynamic Configuration
- Logging Context
- Proven architecture
- Modular and extensible design
- High performance with flexibility
Support for multiple frameworks:
log4net runs on all ECMA CLI 1.0 compatible runtimes. log4net has specific builds for the following frameworks:
- Microsoft® .NET Framework 1.0
- Microsoft .NET Framework 1.1
- Microsoft .NET Framework 2.0
- Microsoft .NET Framework 3.5
- Microsoft .NET Framework 4.0
- Microsoft .NET Framework 3.5 Client Profile
- Microsoft .NET Framework 4.0 Client Profile
- Microsoft .NET Compact Framework 1.0*
- Microsoft .NET Compact Framework 2.0
- Mono 1.0
- Mono 2.0
- Microsoft Shared Source CLI 1.0*
- CLI 1.0 Compatible
- Microsoft .NET Core 1.0 providing .NET Standard 1.3
The "Client Profile" builds are stripped down versions of the "normal" builds that don't contain any ASP.NET releated code - which for example means the %aspnet-*
patterns and the AspNetTraceAppender
are not available.
* Not supported by the binary release but can be built from the source release.
Official Website: http://logging.apache.org/log4net/
Useful Links: