相同log4net appender azure nuget
的代码适用于console app,
but not working in MVC application
.
我正在使用这个 nugetlog4net.Appender.Azure 1.1.1
已添加log4net.Config.XmlConfigurator.Configure();
到 Global.asax
web.config
<log4net>
<!-- Azure Table Appender, uncomment, set proper QueueName and AWS credentials (appSettings) to try it out -->
<appender name="AzureAppender1" type="log4net.Appender.AzureTableAppender, log4net.Appender.Azure">
<param name="TableName" value="test" />
<param name="ConnectionString" value="***" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date [%thread] %-5level %logger [%property{NDC}] - %message%newline" />
</layout>
</appender>
谁能知道它为什么不工作?