我已经编写了 custon Appendar 并覆盖了 Append 方法。我在该方法中获取 LoggingEvent,但是当我查看 LocationInformation 时它是空的,它只显示“?” 在以下属性中。
protected override void Append(log4net.Core.LoggingEvent loggingEvent)
{
ClassName = loggingEvent.LocationInformation.ClassName /*contains "?"*/,
MethodName = loggingEvent.LocationInformation.MethodName /*contains "?"*/,
FileName = loggingEvent.LocationInformation.FileName /*contains "?"*/,
FullInfo = loggingEvent.LocationInformation.FullInfo /*contains "?"*/,
}
我做错了什么?
谢谢