log4net:ERROR XmlHierarchyConfigurator: Cannot find Property [File] to set object on [TF.Log.FileAppender]
难受,香菇。
大概研究了两个多小时,搜了很多资料都没有很完美的答案,最后突然脑子就一闪一闪,才弄明白咋回事。
log4net:ERROR XmlHierarchyConfigurator: Cannot find Property [File] to set object on [TF.Log.FileAppender]
背景:我们遵循了适配器模式,为log4net在外面又包装了一层。外面那层名称为我上面错误显示的:TF.Log
和 log4net:ERROR XmlHierarchyConfigurator: Cannot find Property [locationInfo] to set object on [log4net.Layout.PatternLayout]
其实是相似的错误,所以不要惊讶我的名字为何和log4net不一样。
咳咳~~接下来就要说正事了,请小盆友们排排坐,仔细瞅!!!
在log4net.config配置文件里面你可以随意添置节点。
eg:
其中在这里的FileAppender类是我自己写的。
由于我没有在我自己写的FileAppender的里面添加上File属性,与配置文件里面的File对应起来,所以就说没有在FileAppender里面找到File节点。
解决方案:前提是自定义文件的话。如果你想在源码上修改。需要找到log4net项目中的FileAppender文件,进行修改。
由于还是菜鸟,里面有很多东西还没有研究透,以上若有不足,请多多指教,及时修改。
log4net:ERROR XmlHierarchyConfigurator: Cannot find Property [File] to set object on [TF.Log.FileAppender]的更多相关文章
- Extending JMeter – Creating Custom Config Element – Property File Reader
JMeter is one of the best open source tools in the Test Automation Community. It comes with all the ...
- (转)win7 64 安装mysql-python:_mysql.c(42) : fatal error C1083: Cannot open include file: 'config-win.h': No such file or directory
原文地址:http://www.cnblogs.com/fnng/p/4115607.html 作者:虫师 今天想在在win7 64位环境下使用python 操作mysql 在安装MySQL-pyth ...
- win7 64 安装mysql-python:_mysql.c(42) : fatal error C1083: Cannot open include file: 'config-win.h': No such file or directory
今天想在在win7 64位环境下使用python 操作mysql 在安装MySQL-python 时报错: _mysql.c _mysql.c(42) : fatal error C1083: Can ...
- [转] --- Error: “A field or property with the name was not found on the selected data source” get only on server
Error: “A field or property with the name was not found on the selected data source” get only on ser ...
- Error: Cannot open main configuration file '//start' for reading! 解决办法
当执行service nagios start启动nagios时,报错:Error: Cannot open main configuration file '//start' for reading ...
- ERROR: “System.Web.Mvc.Controller.File(string, string, string)”是一个“方法”
ERROR: “System.Web.Mvc.Controller.File(string, string, string)”是一个“方法”,这在给定的上下文中无效 这是一个与Controller.F ...
- _mysql.c(42) : fatal error C1083: Cannot open include file: 'config-win.h':问题的解决 mysql安装python
在win7下安装了Python后,想安装python-MySQL,使用pip安装出现如下问题: >pip install MySQL-python _mysql.c(42) : fatal er ...
- WebViewer报错Error loading document: Invalid XOD file: Zip end header data is wrong size!
错误:Error loading document: Invalid XOD file: Zip end header data is wrong size! 解决:https://groups.go ...
- 【MySQL】InnoDB: Error: checksum mismatch in data file 报错
参考:http://www.jb51.net/article/66951.htm 用5.7版本启动原5.5实例后,再用5.5启动出现以下报错 InnoDB: Error: checksum misma ...
随机推荐
- Python爬虫 【requests】request for humans
安装 pip install requests 源码 git clone git://github.com/kennethreitz/requests.git 导入 import requests 发 ...
- 使用 whistle 替代本地 nginx/webpack 服务
加入鹅厂之后,我发现团队都在用一款叫做 Whistle 的工具,起初我以为这只是一款类似 Fiddler/Charles 的普通货色.然鹅,发现下面这两种用法之后,我把自己的膝盖摘下来献给了制作这款工 ...
- Oracle AWRDD报告生成和性能分析
我写的SQL调优专栏:https://blog.csdn.net/u014427391/article/category/8679315 对于局部的,比如某个页面列表sql,我们可以使用Oracle的 ...
- mysql的学习笔记(四)
---恢复内容开始--- 1.插入操作 INSERT (1)INSERT table_name(col_name,...) VALUES(...),(....) CREATE TABLE user( ...
- 自写脚本实现上线前本地批量压缩混淆 js , css 代码。
最近做项目遇到一个要求,就是把本地的 js 和 css 进行压缩后再上线,由于之前项目并没有使用 webpack 之类的库,项目上也因为一些机密不能在线上压缩,这无疑给代码打包压缩带来了很大麻烦,于是 ...
- java~IDEA引用包时分组所有java包
对于java系统包,我们的IDEA里开发项目时,如果你使用了java系统包,如import java.util,那么,你可以把它和其它第三方的包分开,这样更清晰,我们可以在设置里,代码风格,java ...
- Window环境下配置MySQL 5.6的主从复制、备份恢复
1.环境准备 Windows 7 64位 MySQL 5.6 主库:192.168.103.207 从库:192.168.103.208 navicat无法连接MySQL8解决方案 #修改加密规则 A ...
- GetTypes Unable to load one or more of the requested types
重新生成项目,更新反射类的dll文件
- [翻译] 对正在使用EF6x开发人员的一些话
Entity Framework Core in Action Entityframework Core in action是 Jon P smith 所著的关于Entityframework Cor ...
- Python使用Ctypes与C/C++ DLL文件通信过程介绍及实例分析
项目中可能会经常用到第三方库,主要是出于程序效率考虑和节约开发时间避免重复造轮子.无论第三方库开源与否,编程语言是否与当前项目一致,我们最终的目的是在当前编程环境中调用库中的方法并得到结果或者借助库中 ...