NLog 相关
2015-07-31 21:41
316 查看
1、关于Windows
Service 中使用NLog无法生成日志文件的问题
解决方案:“
For anyone looking at this thread in the future, another reason to not see output is if you do not specify the directory on the file.
ex: <target name="file" fileName="log_NLog.log" xsi:type="File" layout="${date} ${message}"/>
When a windows service starts up, the current directory is windows\system32 (or the equivalent). Look in this directory for output. To solve this problem, specify the directory
ex: <target name="file" fileName="${basedir}/log_NLog.log" xsi:type="File" layout="${date} ${message}"/>”。
from:
http://stackoverflow.com/questions/858597/why-wont-my-windows-service-write-to-my-log-file http://nlog-forum.1685105.n2.nabble.com/Nlog-not-working-with-Windows-service-td6711077.html#a6825698
Service 中使用NLog无法生成日志文件的问题
解决方案:“
For anyone looking at this thread in the future, another reason to not see output is if you do not specify the directory on the file.
ex: <target name="file" fileName="log_NLog.log" xsi:type="File" layout="${date} ${message}"/>
When a windows service starts up, the current directory is windows\system32 (or the equivalent). Look in this directory for output. To solve this problem, specify the directory
ex: <target name="file" fileName="${basedir}/log_NLog.log" xsi:type="File" layout="${date} ${message}"/>”。
from:
http://stackoverflow.com/questions/858597/why-wont-my-windows-service-write-to-my-log-file http://nlog-forum.1685105.n2.nabble.com/Nlog-not-working-with-Windows-service-td6711077.html#a6825698
相关文章推荐
- LIS longest Increasing subarray 最长递增子序列
- Python删除指定时间的文件
- xml复习
- MySQL数据库的基础操作(建表,建库,插入,删除)
- [IOS] Class Memory Analysis
- C++ 智能指针详解
- 没有组织机构代码证、公章怎么认证微信公众号?
- python数据结构与算法——二叉树结构与遍历方法
- Android 笔记之Cursor 类
- 《汇编语言》第二版 王爽著 第八章 数据处理的两个基本问题 要点
- SpringMvc+Spring+Mybatis 环境集成
- eclipse hadoop远程调试
- SQLServer全文索引
- 51 单片机内存的认识
- Centos7安装Docker
- 如何在Windows平台下安装或卸载Apache服务
- 编程实现单链表的排序
- mysql启动错误:Starting MySQL.. ERROR! The server quit without updating PID file错误
- 营业执照没公司名字、字号怎么认证微信
- C++ string 类的 find 方法实例详解