当前位置: 首页 > news >正文

Nlog配置文件nlog.config (.net core 6)

<?xml version="1.0" encoding="utf-8" ?>
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://www.nlog-project.org/schemas/NLog.xsd"autoReload="true"throwConfigExceptions="true"internalLogLevel="Info"internalLogFile="c:\temp\internal-nlog-AspNetCore.txt"><!-- enable asp.net core layout renderers --><extensions><add assembly="NLog.Web.AspNetCore"/></extensions><!-- the targets to write to --><targets><!-- File Target for all log messages with basic details --><target xsi:type="File" name="allfile" fileName="c:\temp\nlog-AspNetCore-all-${shortdate}.log"layout="${longdate}|${event-properties:item=EventId:whenEmpty=0}|${level:uppercase=true}|${logger}|${message} ${exception:format=tostring}" /><!-- File Target for own log messages with extra web details using some ASP.NET core renderers --><target xsi:type="File" name="ownFile-web" fileName="c:\temp\nlog-AspNetCore-own-${shortdate}.log"layout="${longdate}|${event-properties:item=EventId:whenEmpty=0}|${level:uppercase=true}|${logger}|${message} ${exception:format=tostring}|url: ${aspnet-request-url}|action: ${aspnet-mvc-action}" /><!--Console Target for hosting lifetime messages to improve Docker / Visual Studio startup detection --><target xsi:type="Console" name="lifetimeConsole" layout="${MicrosoftConsoleLayout}" /></targets><!-- rules to map from logger name to target --><rules><!-- All logs, including from Microsoft --><logger name="*" minlevel="Trace" writeTo="allfile" /><!-- Suppress output from Microsoft framework when non-critical --><logger name="System.*" finalMinLevel="Warn" /><logger name="Microsoft.*" finalMinLevel="Warn" /><!-- Keep output from Microsoft.Hosting.Lifetime to console for fast startup detection --><logger name="Microsoft.Hosting.Lifetime*" finalMinLevel="Info" writeTo="lifetimeConsole" /><logger name="*" minLevel="Trace" writeTo="ownFile-web" /></rules>
</nlog>

 

http://www.gsyq.cn/news/41184.html

相关文章:

  • Http协议解析
  • NOIP 2024 T4 树上查询 小结
  • NOIP 2022 T3 建造军营 小结
  • 英语_阅读_Digital classroom_待读
  • 2025.11.5——1绿1蓝
  • PhotoShop网页版(在线ps)在快速修复老照片,在线修旧如新
  • Revive Adserver SQL注入漏洞分析:关键词参数引发的数据库安全风险
  • 2025 年 11 月硅锰合金厂家推荐排行榜,硅锰合金颗粒,硅锰合金粉,高碳硅锰合金,低碳硅锰合金公司推荐
  • 2025年轻触开关厂家推荐排行榜,检测开关,按键开关,微动开关,防水开关源头厂家最新权威精选
  • 2025年连接器厂家推荐排行榜,USB连接器,电池连接器,TYPE-C连接器,防水TYPE-C连接器,防水USB连接器公司精选
  • 银河麒麟申威系统安装nfs-utils-2.4.3-1.ky10.sw_64.rpm详细步骤(含依赖解决和NFS服务启动)
  • smartproxy API 代理——控制平面 + 策略治理
  • gcc如何传递C/C++函数的聚合类参数
  • 31
  • TiDB数据库从零开始
  • 锁定缓冲区的概念
  • 【UEGamePlay】- 3C篇(一) : 输入
  • Ubuntu下安装Nvidia驱动CUDAgpu_burn的一些步骤注意事项错误修复
  • NOIp模拟2 模拟退火 笔记
  • 易路全球AI峰会Day1收官,引领AI HR新未来
  • P8328 [COCI 2021/2022 #5] Usmjeravanje
  • NPU(神经网络处理器) - ENGINEER
  • 告别漫长GC停顿:深入解析G1如何实现可预测的毫秒级响应
  • 从编码到部署:5大AI工具盘活你的全栈开发流程
  • CF1770F Koxia and Sequence
  • 数据采集与融合技术实践2
  • 2025 年板材源头厂家最新推荐排行榜:聚焦绿色生产与环保认证,精选七家优质企业深度解析
  • 智能家居产品品牌怎么选择:2025年最新攻略
  • 2025年床垫品牌加盟哪家口碑好?床垫品牌加盟推荐
  • 【转载】(修改版本)浮点数的表现形式