Search code examples
c#log4netadonetappender

log4net multiple adonetappender


Is there a way to use more than one ADONetAppender in the same application. Currently I have one ado appender logging to the "Log" table. I would like to add another ADONetAppender to log to another table in the same application. Searching the google did not return much help.

Please let me know.

thanks


Solution

  • Yes, in my Blog post here: http://weblogs.asp.net/stevewellens/archive/2012/01/22/log4net-log-to-a-javascript-console.aspx I use three appenders.

    Here is where they get listed:

    <logger name="MyLogger">
      <level value="ALL" />
      <appender-ref ref="LogFileAppender"  />
      <appender-ref ref="TraceAppender"  />
      <appender-ref ref="JSConsoleAppender"  />
    </logger>
    

    There's more but I'm not going to duplicate the whole post here.