我正在使用log4net與.NET Common.Logging。我配置了消息模式,包括方法和類的名稱,像這樣:記錄方法或類名始終寫入Common.Logging方法
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%-5level [%M %C] - %message%newline" />
</layout>
問題是,我總是得到Common.Logging方法和類的名稱:
FATAL [Fatal Common.Logging.Factory.AbstractLogger] - log message
INFO [Info Common.Logging.Factory.AbstractLogger] - log message
DEBUG [Debug Common.Logging.Factory.AbstractLogger] - log message
它是最無用的。有沒有辦法打印我的方法名稱?
你說得對。有一個與此任務相關的開放式錯誤:https://sourceforge.net/tracker/index.php?func=detail&aid=3044182&group_id=182424&atid=901156 – HuBeZa 2011-01-13 15:11:12
該問題已於2010-08-13開放,但仍爲常用。記錄2.1.1 – 2012-09-28 23:48:48