.net-core-log4net不支持.Net核心中的AdoNetAppender?

我正在尝试在我们的点网核心1.1.2应用程序中实现log4net 2.0.8. ConsoleAppender运行正常,但是AdoNetAppender抛出错误:

Could not load type ‘log4net.Appender.AdoNetAppender’

Dot Net Core仍不支持AdoNetAppender吗?

我的配置:

<?xml version="1.0" encoding="utf-8" ?>
<log4net debug="true">
  <appender name="ConsoleAppender" type="log4net.Appender.ConsoleAppender">
    <layout type="log4net.Layout.PatternLayout">
      <conversionPattern value="%date{ABSOLUTE} [%thread] %-5level %logger: %message%newline" />
    </layout>
  </appender>
  <appender name="AdoNetAppender" type="log4net.Appender.AdoNetAppender">
    <bufferSize value="1" />
    <connectionType value="System.Data.SqlClient.SqlConnection, System.Data, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
    <connectionString value="data source=MyMSSQLServer; initial catalog=MyDatabase;integrated security=false;persist security info=True;User ID=sa;Password=***" />
    <commandText value="dbo.prcLog4Net_LogMsg" />
    <commandType value="StoredProcedure" />
    <parameter>
      <parameterName value="@session_id" />
      <dbType value="Int" />
      <layout type="log4net.Layout.PatternLayout">
        <conversionPattern value="%property{session_id}" />
      </layout>
    </parameter>
    <parameter>
      <parameterName value="@message" />
      <dbType value="AnsiString" />
      <size value="4000" />
      <layout type="log4net.Layout.PatternLayout">
        <conversionPattern value="%message" />
      </layout>
    </parameter>
  </appender>
  <root>
    <level value="DEBUG" />
    <appender-ref ref="ConsoleAppender" />
    <appender-ref ref="AdoNetAppender" />
  </root>
</log4net>
最佳答案
不支持ado.net附加程序,您可以在以下页面中查找它:
framework-support.html#Appenders

转载注明原文:.net-core-log4net不支持.Net核心中的AdoNetAppender? - 代码日志