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

Dietmar Kurok commented on LOG4NET-1:
-------------------------------------

Hello Julie,
sometimes reading helps; you wrote it perfectly in your comment: Just adding 
the appender-ref in the main appender like this helps:
<!-- "Normal" appender which logs to a WCF-service 
(NetTcp.WCFAppenderServiceEndpoint is a named endpoint in my client's 
<system.serviceModel><client>-configuration...)-->

<appender name="WcfAppender" type="log4net.Appender.WCFAppender, WCFAppender ">
      <!--<layout type="log4net.Layout.PatternLayout">
        <ConversionPattern value="%m" />
      </layout>-->
      <bufferSize value="5" />
      <lossy value="true"/>
      <!--<sink value="WCFAppenderServiceEndpoint" />-->
      <sink value="NetTcp.WCFAppenderServiceEndpoint" />
      <evaluator type="log4net.Core.LevelEvaluator">
        <threshold value="ERROR" />
      </evaluator>
      <errorHandler type="log4net.Appender.WCFAppenderErrorHandler, 
WCFAppender" />
      <appender-ref ref="RollingLogFileAppender"/>
    </appender>

    <appender name="RollingLogFileAppender" 
type="log4net.Appender.RollingFileAppender">
      <file value="logfile.txt" />
      <appendToFile value="false" />
      <rollingStyle value="Size" />
      <maxSizeRollBackups value="-1" />
      <maximumFileSize value="50GB" />
      <layout type="log4net.Layout.PatternLayout">
        <conversionPattern value="%date [%thread] %-5level %logger 
[%property{NDC}] - %message%newline" />
      </layout>
    </appender>

> Support Fallback Appenders
> --------------------------
>
>                 Key: LOG4NET-1
>                 URL: https://issues.apache.org/jira/browse/LOG4NET-1
>             Project: Log4net
>          Issue Type: New Feature
>          Components: Appenders, Core
>    Affects Versions: 1.2.9
>         Environment: From sourceforge
>            Reporter: Nicko Cadell
>             Fix For: v.Next
>
>         Attachments: RemotingAppender.cs
>
>
> Basically, I'm looking for the ability to set up a hierarchy of appenders so 
> that if a log to an ADONETAppender fails, log4net could then log to one of 
> more "back-up" appenders, for example, a RollingLogFile or SMTP.
> Thanks,
> Leo
> Leo J. Hart IV

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to