Click here to Skip to main content
Click here to Skip to main content
Articles » Languages » C# » General » Downloads
 
Add your own
alternative version
Go to top

log4net XmlConfigurator Simplified

, 16 Jun 2007
This article covers the configuration of log4net using the XmlConfigurator. This article also demonstrates how to create multiple log files for your application.
MultipleLoggers.zip
MultipleLoggers
bin
Debug
log4net.dll
logs
MyCompany.MultipleLoggers.exe
MyCompany.MultipleLoggers.vshost.exe
MyCompany.MyLibrary1.dll
MyCompany.MyLibrary2.dll
Properties
Settings.settings
MyLibrary1
bin
Debug
MyCompany.MyLibrary1.dll
Properties
MyLibrary2
bin
Debug
MyCompany.MyLibrary2.dll
Properties
log4net_objects.gif
MultipleLoggers.suo

Microsoft Visual Studio Solution File, Format Version 9.00
# Visual Studio 2005
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MultipleLoggers", "MultipleLoggers\MultipleLoggers.csproj", "{A4C92524-4107-42D2-8A5F-21B646C254A9}"
	ProjectSection(WebsiteProperties) = preProject
		Debug.AspNetCompiler.Debug = "True"
		Release.AspNetCompiler.Debug = "False"
	EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MyLibrary1", "MyLibrary1\MyLibrary1.csproj", "{26984D76-202C-4347-AB9E-6DA872505AD6}"
	ProjectSection(WebsiteProperties) = preProject
		Debug.AspNetCompiler.Debug = "True"
		Release.AspNetCompiler.Debug = "False"
	EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MyLibrary2", "MyLibrary2\MyLibrary2.csproj", "{C9F51585-7EC3-4C45-8508-3F0CC002A396}"
	ProjectSection(WebsiteProperties) = preProject
		Debug.AspNetCompiler.Debug = "True"
		Release.AspNetCompiler.Debug = "False"
	EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{3AFF4BE5-B344-4015-A7BF-658BB8417FB9}"
	ProjectSection(WebsiteProperties) = preProject
		Debug.AspNetCompiler.Debug = "True"
		Release.AspNetCompiler.Debug = "False"
	EndProjectSection
	ProjectSection(SolutionItems) = preProject
		log4net_configuration_demystified.htm = log4net_configuration_demystified.htm
		log4net_objects.gif = log4net_objects.gif
	EndProjectSection
EndProject
Global
	GlobalSection(SolutionConfigurationPlatforms) = preSolution
		Debug|Any CPU = Debug|Any CPU
		Release|Any CPU = Release|Any CPU
	EndGlobalSection
	GlobalSection(ProjectConfigurationPlatforms) = postSolution
		{A4C92524-4107-42D2-8A5F-21B646C254A9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
		{A4C92524-4107-42D2-8A5F-21B646C254A9}.Debug|Any CPU.Build.0 = Debug|Any CPU
		{A4C92524-4107-42D2-8A5F-21B646C254A9}.Release|Any CPU.ActiveCfg = Release|Any CPU
		{A4C92524-4107-42D2-8A5F-21B646C254A9}.Release|Any CPU.Build.0 = Release|Any CPU
		{26984D76-202C-4347-AB9E-6DA872505AD6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
		{26984D76-202C-4347-AB9E-6DA872505AD6}.Debug|Any CPU.Build.0 = Debug|Any CPU
		{26984D76-202C-4347-AB9E-6DA872505AD6}.Release|Any CPU.ActiveCfg = Release|Any CPU
		{26984D76-202C-4347-AB9E-6DA872505AD6}.Release|Any CPU.Build.0 = Release|Any CPU
		{C9F51585-7EC3-4C45-8508-3F0CC002A396}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
		{C9F51585-7EC3-4C45-8508-3F0CC002A396}.Debug|Any CPU.Build.0 = Debug|Any CPU
		{C9F51585-7EC3-4C45-8508-3F0CC002A396}.Release|Any CPU.ActiveCfg = Release|Any CPU
		{C9F51585-7EC3-4C45-8508-3F0CC002A396}.Release|Any CPU.Build.0 = Release|Any CPU
	EndGlobalSection
	GlobalSection(SolutionProperties) = preSolution
		HideSolutionNode = FALSE
	EndGlobalSection
EndGlobal

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Joseph Guadagno
Web Developer
United States United States
I have been in software development for about 15 years or so. I started out with a small book on QuickBASIC, then moved the Visual Basic for DOS, then Visual Basic for Windows, then Visual Basic .NET and eventually Visual C#. When I am not working at my full time job I donate my time to several community efforts like:
 
Former President of INETA North America, currently Vice President.
President of the Southeast Valley .NET User Group (SEVDNUG) in Chandler, AZ.
Serving on my City's Parks and Recreation board.
 
I have or have had the following "MVP" awards:
  • Visual Basic MVP in 1996
  • C# MVP since 2009
  • Telerik MVP since 2010
I maintain a Open Source project on CodePlex which wraps the Bing API called BingSharp.
 
I also help / organize or participate in several community events:
  • Desert Code Camp
  • AZGiveCamp
  • Organizer for the 1st Time MVP event at the MVP Summit
  • MVP 2 MVP Sessions at MVP Summit.
  • Awesome bean pusher at GeekGive at the MVP Summit.
Follow on   Twitter

| Advertise | Privacy | Mobile
Web01 | 2.8.140905.1 | Last Updated 16 Jun 2007
Article Copyright 2007 by Joseph Guadagno
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid