I am using log4net in a C# project, in the production environment, I want to disable all the logging, but when some fatal error occures it should log all the previous 512 messages in to a file.I have successfully configured this, and it is working fine. It logs the messages in to a file when some fatal error occures.
But when I run it from Visual Studio, I can see all the log messages are written to the Output window, regardless of whether it is a Fatal or not. (I cant see these messages when I run from the Windows Explorer - my application is a WinForm exe and there is no Console window to see the output)
Is there any way to disable this logging? I need my logs only in file, that too when some fatal error occures.
<?xml version="1.0" encoding="utf-8" ?>
And this is how I configure it in the static initializer of Windows Forms.
static Window1()
{
Stream vStream = typeof(Window1).Assembly.GetManifestResourceStream("TestLogNet.log4net.config");
XmlConfigurator.Configure(vStream);
BasicConfigurator.Configure();
}
And I have the logger object initialized in the constructor of WinForm
logger = LogManager.GetLogger(typeof(Window1));
[language - C#, .NET Framework - 3.5, Visual Studio 2008, log4net 1.2.10, project type - WinForms]
JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)