logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ron Grabowski <rongrabow...@yahoo.com>
Subject Re: log4net .NET 1.1 problem
Date Wed, 20 Feb 2008 23:41:19 GMT
Does your TraceListener have write access to the place where its trying to create a file? If
you're having file permission issues, why not record the debug messages in memory then inspect
them later (i.e. use Response.Write to print them out):

// untested
public class MessagesTraceListener : TraceListener
    private static IList messages = ArrayList.Synchronized(new ArrayList());

    public override void Write(string message)

    public override void WriteLine(string message)

    public static IList Messages
        get { return messages; }

----- Original Message ----
From: vikram srinivasan <vikramtheking@googlemail.com>
To: log4net-user@logging.apache.org
Sent: Wednesday, February 20, 2008 8:01:53 AM
Subject: log4net .NET 1.1 problem

I am trying to deploy an application that uses log4net.dll version The .NET FW
that I use is 1.1 and running against IIS 6.0 on Windows 2003. 
The trouble is there is no log file being created when I run the application against 1.1.
However, if I switch the application to use 2.0, everything is fine. Due to circumstances,
I cannot switch my app to 2.0 on production. 
I would like to know where I can see any log4net initialisation errors. I did to turn on internal
debugging. But system.diagnostics doesnt seem to work with 1.1 for some reason. I get the
following error, 
Configuration Error 
Description: An error occurred during the processing of a configuration file required to service
this request. Please review the specific error details below and modify your configuration
file appropriately. 
Parser Error Message: Exception in configuration section handler.
Source Error: 

Line 182:        <globalization requestEncoding="utf-8" responseEncoding="utf-8"/>
Line 183:    </system.web>
Line 184:    <system.diagnostics>
Line 185:        <trace autoflush="true">
Line 186:            <listeners>
Source File: E:\Plumtree\ptntcws\6.0\webapp\ntcws\web.config    Line: 184 
Could someone please help me with this?

View raw message