国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 學院 > 開發設計 > 正文

Nlog

2019-11-14 16:17:53
字體:
來源:轉載
供稿:網友

安裝Nlog

通過NuGet的Console方式

PM> Install-Package NLog

或者直接用Manage

添加配置文件內容

%201%20<?xml%20version="1.0"%20encoding="utf-8"%20?>%202%20<configuration>%203%20%20%20<configSections>%204%20%20%20%20%20<section%20name="nlog"%20type="NLog.Config.ConfigSectionHandler,%20NLog"/>%205%20%20%20</configSections>%206%20%20%20<nlog%20xmlns="http://www.nlog-

相關介紹鏈接

http://nlog-project.org/

https://github.com/nlog/nlog/wiki/Configuration-file

http://m.survivalescaperooms.com/dflying/archive/2006/12/06/584426.html(翻譯版)

 常用配置(異常和信息記錄分類按日期保存):

<configSections>    <section name="nlog" type="NLog.Config.ConfigSectionHandler, NLog"/>  </configSections>  <nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd"  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">    <targets>      <target name="fileError" xsi:type="File" fileName="logs/Error/${shortdate}.txt" layout="${date:format=HH/:mm/:ss}-${stacktrace}-${message}"/>      <target name="fileInfo" xsi:type="File" fileName="logs/Info/${shortdate}.txt" layout="${date:format=HH/:mm/:ss}-${message}"/>    </targets>    <rules>      <logger name="*" levels="Error" writeTo="fileError"/>      <logger name="*" levels="Info" writeTo="fileInfo"/>    </rules>  </nlog>

 


發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 扎兰屯市| 永清县| 拜泉县| 藁城市| 达孜县| 瑞安市| 安多县| 宁蒗| 年辖:市辖区| 宜兴市| 龙岩市| 洛川县| 呼玛县| 涿鹿县| 德清县| 鹤山市| 屯门区| 定陶县| 绵竹市| 鄯善县| 金秀| 行唐县| 永寿县| 彭州市| 隆安县| 仙居县| 醴陵市| 繁昌县| 安康市| 邹平县| 昆山市| 清新县| 南涧| 舞钢市| 宁强县| 略阳县| 全州县| 华安县| 泽普县| 册亨县| 苍山县|