<?xml version="1.0" encoding="utf-8" ?>
<!-- This is an example logging config file that enables details logs for every part of the codebase. Logs are kept for 14 days. -->
<!-- For an explanation on how to use this file, go to https://github.com/stratisproject/StratisBitcoinFullNode/blob/master/Documentation/using-logging.md. -->
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" autoReload="true">
  <targets> 
    <!-- API -->
    <target name="debugApiFile" xsi:type="AsyncWrapper" queueLimit="10000" overflowAction="Block" batchSize="1000">
      <target xsi:type="File" fileName="api.txt" archiveNumbering="Date" maxArchiveFiles="14" archiveEvery="Day" layout="[${longdate:universalTime=true} ${threadid}${mdlc:item=id}] ${level:uppercase=true}: ${callsite} ${message}" encoding="utf-8" /> 
    </target>
    
    <!-- BLOCK STORE -->
    <target name="debugBlockStoreFile" xsi:type="AsyncWrapper" queueLimit="10000" overflowAction="Block" batchSize="1000">
      <target xsi:type="File" fileName="blockstore.txt" archiveNumbering="Date" maxArchiveFiles="14" archiveEvery="Day" layout="[${longdate:universalTime=true} ${threadid}${mdlc:item=id}] ${level:uppercase=true}: ${callsite} ${message}" encoding="utf-8" /> 
    </target>    
    
    <!-- CONSENSUS -->
    <target name="debugCoinViewsFile" xsi:type="AsyncWrapper" queueLimit="10000" overflowAction="Block" batchSize="1000">
      <target xsi:type="File" fileName="coinview.txt" archiveNumbering="Date" maxArchiveFiles="14" archiveEvery="Day" layout="[${longdate:universalTime=true} ${threadid}${mdlc:item=id}] ${level:uppercase=true}: ${callsite} ${message}" encoding="utf-8" /> 
    </target>
    <target name="debugConsensusFile" xsi:type="AsyncWrapper" queueLimit="10000" overflowAction="Block" batchSize="1000">
      <target xsi:type="File" fileName="consensus.txt" archiveNumbering="Date" maxArchiveFiles="14" archiveEvery="Day" layout="[${longdate:universalTime=true} ${threadid}${mdlc:item=id}] ${level:uppercase=true}: ${callsite} ${message}" encoding="utf-8" /> 
    </target>
    <target name="debugConsensusValidationFile" xsi:type="AsyncWrapper" queueLimit="10000" overflowAction="Block" batchSize="1000">
      <target xsi:type="File" fileName="consensusValidation.txt" archiveNumbering="Date" maxArchiveFiles="14" archiveEvery="Day" layout="[${longdate:universalTime=true} ${threadid}${mdlc:item=id}] ${level:uppercase=true}: ${callsite} ${message}" encoding="utf-8" /> 
    </target>
    
    <!-- DNS -->
    <target name="debugDnsFile" xsi:type="AsyncWrapper" queueLimit="10000" overflowAction="Block" batchSize="1000">
      <target xsi:type="File" fileName="dns.txt" archiveNumbering="Date" maxArchiveFiles="14" archiveEvery="Day" layout="[${longdate:universalTime=true} ${threadid}${mdlc:item=id}] ${level:uppercase=true}: ${callsite} ${message}" encoding="utf-8" /> 
    </target>
    
    <!-- LIGHT WALLET -->
    <target name="debugLightWalletFile" xsi:type="AsyncWrapper" queueLimit="10000" overflowAction="Block" batchSize="1000">
      <target xsi:type="File" fileName="lightWallet.txt" archiveNumbering="Date" maxArchiveFiles="14" archiveEvery="Day" layout="[${longdate:universalTime=true} ${threadid}${mdlc:item=id}] ${level:uppercase=true}: ${callsite} ${message}" encoding="utf-8" /> 
    </target>
    
    <!-- MEMORY POOL -->
    <target name="debugMemoryPoolFile" xsi:type="AsyncWrapper" queueLimit="10000" overflowAction="Block" batchSize="1000">
      <target xsi:type="File" fileName="mempool.txt" archiveNumbering="Date" maxArchiveFiles="14" archiveEvery="Day" layout="[${longdate:universalTime=true} ${threadid}${mdlc:item=id}] ${level:uppercase=true}: ${callsite} ${message}" encoding="utf-8" /> 
    </target>
  
      <!-- MINER -->
    <target name="debugMinerFile" xsi:type="AsyncWrapper" queueLimit="10000" overflowAction="Block" batchSize="1000">
      <target xsi:type="File" fileName="miner.txt" archiveNumbering="Date" maxArchiveFiles="14" archiveEvery="Day" layout="[${longdate:universalTime=true} ${threadid}${mdlc:item=id}] ${level:uppercase=true}: ${callsite} ${message}" encoding="utf-8" /> 
    </target>
  
      <!-- NOTIFICATIONS -->
    <target name="debugNotificationsFile" xsi:type="AsyncWrapper" queueLimit="10000" overflowAction="Block" batchSize="1000">
      <target xsi:type="File" fileName="notifications.txt" archiveNumbering="Date" maxArchiveFiles="14" archiveEvery="Day" layout="[${longdate:universalTime=true} ${threadid}${mdlc:item=id}] ${level:uppercase=true}: ${callsite} ${message}" encoding="utf-8" /> 
    </target>
      
      <!-- RPC -->
    <target name="debugRPCFile" xsi:type="AsyncWrapper" queueLimit="10000" overflowAction="Block" batchSize="1000">
      <target xsi:type="File" fileName="rpc.txt" archiveNumbering="Date" maxArchiveFiles="14" archiveEvery="Day" layout="[${longdate:universalTime=true} ${threadid}${mdlc:item=id}] ${level:uppercase=true}: ${callsite} ${message}" encoding="utf-8" /> 
    </target>
  
    <!-- WALLET -->
    <target name="debugWalletFile" xsi:type="AsyncWrapper" queueLimit="10000" overflowAction="Block" batchSize="1000">
      <target xsi:type="File" fileName="wallet.txt" archiveNumbering="Date" maxArchiveFiles="14" archiveEvery="Day" layout="[${longdate:universalTime=true} ${threadid}${mdlc:item=id}] ${level:uppercase=true}: ${callsite} ${message}" encoding="utf-8" /> 
    </target>
  
    <!-- WATCH ONLY WALLET -->
    <target name="debugWatchOnlyWalletFile" xsi:type="AsyncWrapper" queueLimit="10000" overflowAction="Block" batchSize="1000">
      <target xsi:type="File" fileName="watchonlywallet.txt" archiveNumbering="Date" maxArchiveFiles="14" archiveEvery="Day" layout="[${longdate:universalTime=true} ${threadid}${mdlc:item=id}] ${level:uppercase=true}: ${callsite} ${message}" encoding="utf-8" /> 
    </target>
   
    <!-- BASE -->
    <target name="debugBaseFile" xsi:type="AsyncWrapper" queueLimit="10000" overflowAction="Block" batchSize="1000">
      <target xsi:type="File" fileName="base.txt" archiveNumbering="Date" maxArchiveFiles="14" archiveEvery="Day" layout="[${longdate:universalTime=true} ${threadid}${mdlc:item=id}] ${level:uppercase=true}: ${callsite} ${message}" encoding="utf-8" /> 
    </target>        
    <target name="debugChainHeadersBehaviorFile" xsi:type="AsyncWrapper" queueLimit="10000" overflowAction="Block" batchSize="1000">
      <target xsi:type="File" fileName="chainheaders.txt" archiveNumbering="Date" maxArchiveFiles="14" archiveEvery="Day" layout="[${longdate:universalTime=true} ${threadid}${mdlc:item=id}] ${level:uppercase=true}: ${callsite} ${message}" encoding="utf-8" /> 
    </target>    
    <target name="debugTimeSyncFile" xsi:type="AsyncWrapper" queueLimit="10000" overflowAction="Block" batchSize="1000">
      <target xsi:type="File" fileName="timesync.txt" archiveNumbering="Date" maxArchiveFiles="14" archiveEvery="Day" layout="[${longdate:universalTime=true} ${threadid}${mdlc:item=id}] ${level:uppercase=true}: ${callsite} ${message}" encoding="utf-8" /> 
    </target>    
    
    <!-- BLOCK PULLER -->
    <target name="debugBlockPullerFile" xsi:type="AsyncWrapper" queueLimit="10000" overflowAction="Block" batchSize="1000">
      <target xsi:type="File" fileName="blockpuller.txt" archiveNumbering="Date" maxArchiveFiles="14" archiveEvery="Day" layout="[${longdate:universalTime=true} ${threadid}${mdlc:item=id}] ${level:uppercase=true}: ${callsite} ${message}" encoding="utf-8" /> 
    </target>

    <!-- CONNECTION -->
    <target name="debugConnectionFile" xsi:type="AsyncWrapper" queueLimit="10000" overflowAction="Block" batchSize="1000">
      <target xsi:type="File" fileName="connection.txt" archiveNumbering="Date" maxArchiveFiles="14" archiveEvery="Day" layout="[${longdate:universalTime=true} ${threadid}${mdlc:item=id}] ${level:uppercase=true}: ${callsite} ${message}" encoding="utf-8" /> 
    </target>
 
    <!-- P2P -->
    <target name="debugP2pFile" xsi:type="AsyncWrapper" queueLimit="10000" overflowAction="Block" batchSize="1000">
      <target xsi:type="File" fileName="p2p.txt" archiveNumbering="Date" maxArchiveFiles="14" archiveEvery="Day" layout="[${longdate:universalTime=true} ${threadid}${mdlc:item=id}] ${level:uppercase=true}: ${callsite} ${message}" encoding="utf-8" /> 
    </target> 
    <target name="debugP2pPeerFile" xsi:type="AsyncWrapper" queueLimit="10000" overflowAction="Block" batchSize="1000">
      <target xsi:type="File" fileName="p2p-peer.txt" archiveNumbering="Date" maxArchiveFiles="14" archiveEvery="Day" layout="[${longdate:universalTime=true} ${threadid}${mdlc:item=id}] ${level:uppercase=true}: ${callsite} ${message}" encoding="utf-8" /> 
    </target>

    <target xsi:type="null" name="null" formatMessage="false" /> 
  </targets>
  <rules>
    <!-- Avoid logging to incorrect folder before the logging initialization is done. If you want to see those logging messages, comment out this line, but your log file will be somewhere else. -->
    <logger name="*" minlevel="Trace" writeTo="null" final="true" />
    
    <logger name="Stratis.Bitcoin.Features.Api.*" minlevel="Trace" writeTo="debugApiFile" />
    
    <logger name="Stratis.Bitcoin.Features.BlockStore.*" minlevel="Trace" writeTo="debugBlockStoreFile" />
    
    <logger name="Stratis.Bitcoin.Features.Consensus.*" minlevel="Trace" writeTo="debugConsensusFile" />
    <logger name="Stratis.Bitcoin.Features.Consensus.CoinViews.*" minlevel="Trace" writeTo="debugCoinViewsFile" />   
    <logger name="Stratis.Bitcoin.Features.Consensus.StakeValidator" minlevel="Trace" writeTo="debugConsensusValidationFile" />
    <logger name="Stratis.Bitcoin.Features.Consensus.Rules.*" minlevel="Trace" writeTo="debugConsensusValidationFile" />

    <logger name="Stratis.Bitcoin.Features.Dns.*" minlevel="Trace" writeTo="debugDnsFile" />
    
    <logger name="Stratis.Bitcoin.Features.LightWallet.*" minlevel="Trace" writeTo="debugLightWalletFile" />
    
    <logger name="Stratis.Bitcoin.Features.MemoryPool.*" minlevel="Trace" writeTo="debugMemoryPoolFile" />
    
    <logger name="Stratis.Bitcoin.Features.Miner.*" minlevel="Trace" writeTo="debugMinerFile" />
    
    <logger name="Stratis.Bitcoin.Features.Notifications.*" minlevel="Trace" writeTo="debugNotificationsFile" />
    
    <logger name="Stratis.Bitcoin.Features.RPC.*" minlevel="Trace" writeTo="debugRPCFile" />
    
    <logger name="Stratis.Bitcoin.Features.Wallet.*" minlevel="Trace" writeTo="debugWalletFile" />
    
    <logger name="Stratis.Bitcoin.Features.WatchOnlyWallet.*" minlevel="Trace" writeTo="debugWatchOnlyWalletFile" />
    
    <logger name="Stratis.Bitcoin.Base.*" minlevel="Trace" writeTo="debugBaseFile" />    
    <logger name="Stratis.Bitcoin.Base.ChainHeadersBehavior" minlevel="Trace" writeTo="debugChainHeadersBehaviorFile" />
    <logger name="Stratis.Bitcoin.Base.TimeSyncBehaviorState" minlevel="Trace" writeTo="debugTimeSyncFile" />
    <logger name="Stratis.Bitcoin.Base.TimeSyncBehavior" minlevel="Trace" writeTo="debugTimeSyncFile" />    
    
    <logger name="Stratis.Bitcoin.BlockPulling.*" minlevel="Trace" writeTo="debugBlockPullerFile" />
    <logger name="Stratis.Bitcoin.Connection.*" minlevel="Trace" writeTo="debugConnectionFile" /> 
    <logger name="Stratis.Bitcoin.P2P.*" minlevel="Trace" writeTo="debugP2pFile" />    
    <logger name="Stratis.Bitcoin.P2P.Peer.*" minlevel="Trace" writeTo="debugP2pPeerFile" />
  </rules>
</nlog>