[ 
https://issues.apache.org/jira/browse/LOG4NET-342?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13284207#comment-13284207
 ] 

Ron Grabowski commented on LOG4NET-342:
---------------------------------------

If I'm working in a web app and I can't get basic logging to work I'll do this:

  <appSettings>
    <add key="log4net.Internal.Debug" value="true"/>
  </appSettings>
  <system.diagnostics>
    <trace autoflush="true">
      <listeners>
        <add name="textWriterTraceListener" 
          type="System.Diagnostics.TextWriterTraceListener"
          initializeData="c:\\path\\to\\application\\App_Data\\og4net.txt" />
      </listeners>
    </trace>
  </system.diagnostics>

Starting with 1.2.11, configurators return an ICollection of LogLog messages:

  var errors = XmlConfigurator.Configure().Cast<LogLog>().Where(x => 
x.Prefix.Contains("ERROR"));

In hindsight the configurators should maintained their current signatures and 
new methods added to return a strongly typed collection of real objects of a 
non-generic collection of our internal LogLog object. When I wrote the code I 
was more concerned with maintaining 1.x compatibility than making it easy for 
non-legacy apps to use new feature :-/
                
> Add a way to prevent silent failure
> -----------------------------------
>
>                 Key: LOG4NET-342
>                 URL: https://issues.apache.org/jira/browse/LOG4NET-342
>             Project: Log4net
>          Issue Type: New Feature
>            Reporter: Joachim Zobel
>            Priority: Minor
>             Fix For: 1.2.12
>
>
> I spent most of the day trying to find out why logging is not working on my 
> dev system but not on test. There should be a way to force error reporting by 
> throwing (possibly unhandled) exceptions. This could be done by adding a 
> required flag to the appenders and another flag that requires a least one 
> working appender.
> I am not sure about a good way to implement this, I would just love it if my 
> favourite tool to end silent failure could stop failing silently. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to