How can I tell log4net which appender to use from app.config

倾然丶 夕夏残阳落幕 提交于 2019-12-05 11:00:16

Use a <logger> element, using the full class name of Foo:

<logger name="full.parent.namespace.Foo">
  <level value="WARN" />
  <appender-ref ref="SomeAppender" />
</logger>

Specify a minimum level and reference to the required output appender to use.

You can also use a single <logger> for all classes in a particular namespace by omitting the class name.

<logger name="full.parent.namespace">
  ....
</logger>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!