我有一些自定义异常继承自具有自定义属性的异常我可以记录自定义的异常属性吗?
[Serializable]
public class MyException : Exception
{
public MyException(string message, string myProperty)
{
MyProperty = myProperty
}
public string MyProperty {get; set;}
}
我想自动添加每个自定义属性到我的log4net日志。有没有内置的方式来做到这一点,或者我是否需要创建某种自定义appender?
我可以在'XmlLayoutSchemaLog4j'中使用它吗? – hellboy