【.Net】塔科夫的nlog config

翻文件夹的时候看见的,记录一下大佬写的config,以后用于项目和分析

<?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 NLog.xsd"
      autoReload="true"
      throwExceptions="true"
      internalLogLevel="Off" internalLogFile="c:\temp\nlog-internal.log">

  <variable name="clientId" value="undefined" />
  <variable name="gameVersion" value="undefined" />
  <variable name="filenamePrefix" value="Logs/log_${var:clientId}/${var:clientId}" />

  <variable name="layoutWithException"
            value="${date:format=yyyy-MM-dd HH\:mm\:ss.fff zzz}|${var:gameVersion}|${level}|${logger}|${message}${all-event-properties:separator=|} ${onexception:${newline}EXCEPTION\: ${exception:format=tostring}}" />
  <variable name="simpleLayout"
            value="${date:format=yyyy-MM-dd HH\:mm\:ss.fff zzz}|${level}|${logger}|${message}${all-event-properties:separator=|}" />

  <targets async="true">
    <target name="errorfile" xsi:type="File"
            layout="${layoutWithException}"
            fileName="${var:filenamePrefix} errors.log"
            archiveFileName="${var:filenamePrefix} errors.{#####}.log"
            concurrentWrites="false"
            keepFileOpen="true" />
    <target name="maperrors" xsi:type="File"
            layout="${layoutWithException}"
            fileName="${var:filenamePrefix} maperrors.log"
            keepFileOpen="true"
            archiveFileName="${var:filenamePrefix} maperrors.{#####}.log"
            archiveAboveSize="524288"
            archiveNumbering="Sequence"
            concurrentWrites="false" />
    <target name="traceFile" xsi:type="File"
            layout="${layoutWithException}"
            fileName="${var:filenamePrefix} traces.log"
            concurrentWrites="false"
            keepFileOpen="true" />
    <target name="animation-debug" xsi:type="File"
            layout="${layoutWithException}"
            fileName="${var:filenamePrefix} animation-debug.log"
            concurrentWrites="false"
            keepFileOpen="true" />
    <target name="player-debug" xsi:type="File"
            layout="${layoutWithException}"
            fileName="${var:filenamePrefix} player-debug.log"
            concurrentWrites="false"
            keepFileOpen="true" />
    <target name="PoolFile" xsi:type="File"
            layout="${layoutWithException}"
            fileName="${var:filenamePrefix} PoolFile.log"
            concurrentWrites="false"
            keepFileOpen="true" />
    <target name="aiMoveData" xsi:type="File"
            layout="${simpleLayout}"
            fileName="${var:filenamePrefix} aiMoveData.log"
            keepFileOpen="true"
            archiveFileName="${var:filenamePrefix} aiMoveData.{#####}.log"
            archiveAboveSize="1048576"
            archiveNumbering="Sequence"
            concurrentWrites="false"/>
    <target name="aiData" xsi:type="File"
            layout="${simpleLayout}"
            fileName="${var:filenamePrefix} aiData.log"
            keepFileOpen="true"
            archiveFileName="${var:filenamePrefix} aiData.{#####}.log"
            archiveAboveSize="1048576"
            archiveNumbering="Sequence"
            concurrentWrites="false"/>
    <target name="resourcesOperations" xsi:type="File"
            layout="${layoutWithException}"
            fileName="${var:filenamePrefix} resourcesOperations.log"
            archiveFileName="${var:filenamePrefix} resourcesOperations.{#####}.log"
            concurrentWrites="false"
            keepFileOpen="true" />
    <target name="applicationFile" xsi:type="File"
            layout="${layoutWithException}"
            deleteOldFileOnStartup="false"
            enableFileDelete="false"
            concurrentWrites="false"
            fileName="${var:filenamePrefix} application.log"
            keepFileOpen="true" />
    <target name="anticheat" xsi:type="File"
            layout="${layoutWithException}"
            fileName="${var:filenamePrefix} anticheat.log"
            concurrentWrites="false"
            keepFileOpen="true" />
    <target name="net-simulation-app-target" xsi:type="File"
            layout="${layoutWithException}"
            fileName="${var:filenamePrefix} net-simulation-app.log"
            concurrentWrites="false"
            keepFileOpen="true" />
    <target name="exfiltration" xsi:type="File"
            layout="${layoutWithException}"
            fileName="${var:filenamePrefix} exfiltration.log"
            concurrentWrites="false"
            keepFileOpen="true" />
    <target name="inventory" xsi:type="File"
            layout="${layoutWithException}"
            fileName="${var:filenamePrefix} inventory.log"
            concurrentWrites="false"
            keepFileOpen="true" />
    <target name="backend_queue" xsi:type="File"
            layout="${layoutWithException}"
            fileName="${var:filenamePrefix} backend_queue.log"
            concurrentWrites="false"
            keepFileOpen="true" />
    <target name="backend" xsi:type="File"
            layout="${layoutWithException}"
            fileName="${var:filenamePrefix}_backend.log"
            concurrentWrites="false"
            keepFileOpen="true" />
    <target name="fps" xsi:type="File"
            layout="${simpleLayout}"
            fileName="${var:filenamePrefix} fps.log"
            keepFileOpen="true"
            archiveFileName="${var:filenamePrefix} fps.{#####}.log"
            archiveAboveSize="524288"
            archiveNumbering="Sequence"
            deleteOldFileOnStartup="true"
            concurrentWrites="false" />
    <target name="localization" xsi:type="File"
            layout="${simpleLayout}"
            fileName="${var:filenamePrefix} localization.log"
            concurrentWrites="false"
            keepFileOpen="true" />
    <target name="pools" xsi:type="File"
            layout="${layoutWithException}"
            fileName="${var:filenamePrefix} pools.log"
            concurrentWrites="false"
            keepFileOpen="true" />
    <target name="surprisesFile" xsi:type="File"
            layout="${layoutWithException}"
            fileName="${var:filenamePrefix} surprises.log"
            archiveFileName="${var:filenamePrefix} surprises.{#####}.log"
            concurrentWrites="false"
            keepFileOpen="true" />
    <target name="resources-debug" xsi:type="File"
            layout="${simpleLayout}"
            fileName="${var:filenamePrefix} resources.log"
            concurrentWrites="false"
            keepFileOpen="true" />
    <target name="aiMapSettingsData" xsi:type="File"
            layout="${simpleLayout}"
            fileName="${var:filenamePrefix} aiMapSettingsData.log"
            keepFileOpen="true"
            archiveFileName="${var:filenamePrefix} aiMapSettingsData.{#####}.log"
            archiveAboveSize="1048576"
            archiveNumbering="Sequence"
            concurrentWrites="false"/>
    <target name="aiCoversData" xsi:type="File"
            layout="${simpleLayout}"
            fileName="${var:filenamePrefix} aiCoversData.log"
            keepFileOpen="true"
            archiveFileName="${var:filenamePrefix} aiCoversData.{#####}.log"
            archiveAboveSize="1048576"
            archiveNumbering="Sequence"
            concurrentWrites="false"/>
    <target name="notifications" xsi:type="File"
            layout="${simpleLayout}"
            fileName="${var:filenamePrefix} notifications.log"
            concurrentWrites="false"
            keepFileOpen="true" />
    <target name="aiDecisionFile" xsi:type="File"
            layout="${layoutWithException}"
            deleteOldFileOnStartup="false"
            enableFileDelete="false"
            concurrentWrites="false"
            fileName="${var:filenamePrefix} aiDetailedFile.log"
            keepFileOpen="true" />
    <target name="spawnsFile" xsi:type="File"
            layout="${simpleLayout}"
            fileName="${var:filenamePrefix} spawns.log"
            deleteOldFileOnStartup="true"
            concurrentWrites="false"
            keepFileOpen="true"/>
    <target name="spawnsystemFile" xsi:type="File"
            layout="${simpleLayout}"
            fileName="${var:filenamePrefix} spawnsystem.log"
            deleteOldFileOnStartup="true"
            concurrentWrites="false"
            keepFileOpen="true" />
    <target name="exfiltration" xsi:type="File"
            layout="${layoutWithException}"
            fileName="${var:filenamePrefix} exfiltration.log"
            concurrentWrites="false"
            keepFileOpen="true" />
    <target name="assetBundle" xsi:type="File"
            layout="${layoutWithException}"
            fileName="${var:filenamePrefix} assetBundle.log"
            concurrentWrites="false"
            keepFileOpen="true" />
    <target name="hideout" xsi:type="File"
            layout="${layoutWithException}"
            fileName="${var:filenamePrefix} hideout.log"
            concurrentWrites="false"
            keepFileOpen="true" />
    <target name="ConnectionDiagnostics" xsi:type="File"
            layout="${layoutWithException}"
            fileName="${var:filenamePrefix} ConnectionDiagnostics.log"
            concurrentWrites="false"
            keepFileOpen="true" />
    <target name="FilesCheckerFile" xsi:type="File"
            layout="${layoutWithException}"
            fileName="${var:filenamePrefix} FilesChecker.log"
            concurrentWrites="false"
            keepFileOpen="true" />
    <target name="speakerFile" xsi:type="File"
            layout="${layoutWithException}"
            deleteOldFileOnStartup="false"
            enableFileDelete="false"
            concurrentWrites="false"
            fileName="${var:filenamePrefix} speaker.log"
            keepFileOpen="true" />
    <target name="spatial-audio" xsi:type="File"
            layout="${layoutWithException}"
            deleteOldFileOnStartup="false"
            enableFileDelete="false"
            concurrentWrites="false"
            fileName="${var:filenamePrefix} spatial-audio.log"
            keepFileOpen="true" />
    <target name="winter" xsi:type="File"
            layout="${layoutWithException}"
            fileName="${var:filenamePrefix} winter.log"
            deleteOldFileOnStartup="true"
            concurrentWrites="false"
            keepFileOpen="true" />
    <target name="network-connection" xsi:type="File"
            layout="${layoutWithException}"
            deleteOldFileOnStartup="false"
            enableFileDelete="false"
            concurrentWrites="false"
            fileName="${var:filenamePrefix}-network-connection.log"
            keepFileOpen="true" />
    <target name="network-messages" xsi:type="File"
            layout="${layoutWithException}"
            deleteOldFileOnStartup="false"
            enableFileDelete="false"
            concurrentWrites="false"
            fileName="${var:filenamePrefix}-network-messages.log"
            keepFileOpen="true" />
  </targets>
  <!-- Logging levels:
      Fatal
      Error
      Warn
      Info
      Debug
      Trace
    -->
  <rules>
    <logger name="*" minlevel="Error" writeTo="errorfile, traceFile" />
    <logger name="Export" writeTo="traceFile" />

    <logger name="FilesChecker" minlevel="Error" writeTo="FilesCheckerFile" final="true" enabled="true"/>
    <logger name="aiData" minlevel="Error" writeTo="aiData" final="true" enabled="true"/>
    <logger name="aiMoveData" minlevel="Error" writeTo="aiMoveData" final="true" enabled="true"/>
    <logger name="aiMapSettingsData" minlevel="Off" writeTo="aiMapSettingsData" />
    <logger name="aiCoversData" minlevel="Warn" writeTo="aiCoversData" final="true" enabled="true"/>
    <logger name="ai_decision" minlevel="Off" writeTo="aiDecisionFile" />
    <logger name="anticheat" minlevel="Error" writeTo="anticheat" />
    <logger name="application" minlevel="Debug" writeTo="applicationFile, traceFile" />
    <logger name="assets" minlevel="Error" writeTo="resourcesOperations, traceFile" />
    <logger name="backend" minlevel="Info" writeTo="traceFile, backend"  final="true" enabled="true"/>
    <logger name="backendCache" minlevel="Trace" writeTo="traceFile, backend" enabled="true" />
    <logger name="backend_queue" minlevel="Info" writeTo="backend_queue" />
    <logger name="exfiltration" minlevel="Debug" writeTo="exfiltration" enabled="false"/>
    <logger name="insurance" minlevel="Warn" writeTo="traceFile" />
    <logger name="inventory" minlevel="Trace" writeTo="inventory, traceFile" />
    <logger name="data_transfer" minlevel="Trace" writeTo="traceFile" />
    <logger name="objectPool" minlevel="Error" writeTo="pools, traceFile" />
    <logger name="ping" minlevel="Off" writeTo="traceFile" />
    <logger name="player" minlevel="Off" writeTo="player-debug" />
    <logger name="scenes" minlevel="Off" writeTo="resourcesOperations, traceFile" />
    <logger name="screen" minlevel="Off" writeTo="traceFile" />
    <logger name="fps" minlevel="Warn" writeTo="fps, traceFile" />
    <logger name="ui_sounds" minlevel="Error" writeTo="traceFile" />
    <logger name="localization" minlevel="Off" writeTo="localization" />
    <logger name="surprises" minlevel="Error" writeTo="surprisesFile, errorfile" final="true" />
    <logger name="resources" minlevel="Error" writeTo="resources-debug" />
    <logger name="push-notifications" minlevel="Info" writeTo="notifications" />
    <logger name="spawns" minlevel="Error" writeTo="spawnsFile" />
    <logger name="spawnsystem" minlevel="Error" writeTo="spawnsystemFile, errorfile" final="true" />
    <logger name="maperrors" minlevel="Error" writeTo="maperrors, errorfile" final="true" />
    <logger name="channels" minlevel="Error" writeTo="errorfile" final="true" />
    <logger name="assetBundle" minlevel="Error" writeTo="assetBundle" />
    <logger name="hideout" minlevel="Error" writeTo="hideout" />
    <logger name="ConnectionDiagnostics" minlevel="Info" writeTo="ConnectionDiagnostics" />
    <logger name="speaker" minlevel="Error" writeTo="speakerFile" />
    <logger name="spatial-audio" minlevel="Info" writeTo="spatial-audio" />
    <logger name="winter" minlevel="Trace" writeTo="winter" />
    <logger name="network-connection" minlevel="Info" writeTo="network-connection" />
    <logger name="network-messages" minlevel="Info" writeTo="network-messages" />

    <!-- ANIMATION DEBUGGING -->
    <logger name="hands-states" minlevel="Trace" writeTo="animation-debug" final="true" enabled="false" />
    <logger name="anim-events-emitter" minlevel="Trace" writeTo="animation-debug" final="true" enabled="false" />
    <logger name="anim-events-container" minlevel="Debug" writeTo="animation-debug" final="true" enabled="false" />
    <logger name="animEvents" minlevel="Trace" writeTo="animation-debug" final="true" enabled="false" />
    <logger name="fast-animator-controller" minlevel="Error" writeTo="animation-debug, traceFile" final="true" enabled="true" />
    <!-- =================== -->

    <!-- NET SIMULATOR DEBUGGING -->
    <logger name="net-simulation-app-logger" minlevel="Trace" writeTo="net-simulation-app-target" final="false" enabled="true" />
  </rules>
</nlog>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值