Am new to this topic and trying to create a fallback functionality on failure of log4net. and ofcs I have gone through few posts that is related to this topic.
https://moaid.codes/post/writing-failov ... r-log4net/
My Custom Log4net Asynch Failover Appender Skips Messages
Below is the simple implementation I have.
Код: Выделить всё
public class ActivityLog : AppenderSkeleton
{
public void Add(int Id)
{
ILog _logger = LogManager.GetLogger("FallbackLogger");
_logger.Info("FallbackLogger");
}
}
Код: Выделить всё
protected override void Append(LoggingEvent loggingEvent)
{
if (loggingEvent == null)
throw new ArgumentNullException("LoggingEvent");
}
Код: Выделить всё
My question is that, none of this configuration does not trigger the Append() function at all & how do I configure this function to trigger and right to log when there is a log4net failure.
Obviously, I am doing something not correct.
Источник: https://stackoverflow.com/questions/781 ... on-c-sharp