![]() |
A single example can be build by running nant from the example directory.
For example running nant in the examples\net\1.0\Tutorials\ConsoleApp\cs directory will build the C# version of the .NET 1.0 ConsoleApp example.
nant can be run in any directory containing a nant.build file. The typical behaviour of the build file is to build all projects under the current directory.
For example running nant in the examples\net\1.1 directory will build all the examples for the .NET 1.1 platform.
To build all the examples either run nant in the examples directory or you can specify the compile-examples target to the main log4net nant build.
There are Visual Studio .NET 2002 project files for the .NET 1.0 framework. The solution files for C++, C# and VB are in the examples\net\1.0 folder.
ConsoleApp shows how to write a simple console application that initializes logging and logs various events.
This example is available for the following platforms and languages. If a version is not available for your chosen platform and language combination then select the nearest platform for the appropriate language.
To run this example execute the ConsoleApp.exe from the build output directory.
ConsoleApp shows how to write a simple ASP.NET web application that initializes logging and logs various events.
This example is available for the following platforms and languages. If a version is not available for your chosen platform and language combination then select the nearest platform for the appropriate language.
To run this example you need to have an ASP.NET container application to host the web application, for example IIS. In IIS create a new virtual directory pointing to the WebApp src directory. Configure IIS to recognize this virtual directory as an application. Open up a webrowser, navigate to the virtual directory and to the WebForm1.aspx page within it.
The RemotingClient application is a simple console application that configures log4net with the RemotingAppender. This appender will attempt to deliver the logging events to a remoting listener. This example should be run in conjunction with the RemotingServer.
This example is available for the following platforms and languages. If a version is not available for your chosen platform and language combination then select the nearest platform for the appropriate language.
To run this example execute the RemotingClient.exe from the build output directory.
The RemotingServer application is a simple console application that listens for logging events from a remote RemotingAppender and then logs them through the local log4net instance. This example should be run in conjunction with the RemotingClient.
This example is available for the following platforms and languages. If a version is not available for your chosen platform and language combination then select the nearest platform for the appropriate language.
To run this example execute the RemotingServer.exe from the build output directory. While this process is running execute the RemotingClient.exe program on the same machine. The logging events from the client are transferred to the server.
The SimpleModule is a class library that is intended to be used as part of the SimpleApp example, This class library uses the log4net.Config.Repository attribute to create a separate configuration space from other assemblies.
This example is available for the following platforms and languages. If a version is not available for your chosen platform and language combination then select the nearest platform for the appropriate language.
This library is intended to be used as part of the SimpleApp example.
The SharedModule is a class library that is intended to be used as part of the SimpleApp example, This class library uses log4net but does not attempt to configure logging.
This example is available for the following platforms and languages. If a version is not available for your chosen platform and language combination then select the nearest platform for the appropriate language.
This library is intended to be used as part of the SimpleApp example.
The SimpleApp example uses the SimpleModule and SharedModule to demonstrate the ways in which multiple assemblies within the same process may be separately configured.
This example is available for the following platforms and languages. If a version is not available for your chosen platform and language combination then select the nearest platform for the appropriate language.
To run this example execute the SimpleApp.exe from the build output directory.
The EventIDLogApp example demonstrates using the log4net.Ext.EventID extension. The extension needs to be built separately from the extensions\net\1.0\log4net.Ext.EventID directory.
This example is available for the following platforms and languages. If a version is not available for your chosen platform and language combination then select the nearest platform for the appropriate language.
To run this example execute the EventIDLogApp.exe from the build output directory.
The TraceLogApp example demonstrates using the log4net.Ext.Trace extension. The extension needs to be built separately from the extensions\net\1.0\log4net.Ext.Trace directory.
This example is available for the following platforms and languages. If a version is not available for your chosen platform and language combination then select the nearest platform for the appropriate language.
To run this example execute the TraceLogApp.exe from the build output directory.
This project includes the following example appenders.
This example is available for the following platforms and languages. If a version is not available for your chosen platform and language combination then select the nearest platform for the appropriate language.
To run this example execute the SampleAppendersApp.exe from the build output directory.
The NotLogging example benchmarks the performance of log4net logging statements in user code in various scenarios including when logging is disabled.
This example is available for the following platforms and languages. If a version is not available for your chosen platform and language combination then select the nearest platform for the appropriate language.