NLog
文件名称:NLog.config
NuGet引用:NLog
Logger logger = NLog.LogManager.GetLogger("批量chaneg");
<?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">
<!--
See https://github.com/nlog/nlog/wiki/Configuration-file
for information on customizing logging rules and outputs.
-->
<targets>
<target name="file" xsi:type="File"
fileName="${basedir}/log_run/${date:format=yyyy}/${date:format=yyyy-MM}/${shortdate}/log${shortdate}${logger}.txt"
archiveFileName="${basedir}/log_run/log_bak/log.{#}.txt"
archiveEvery="Day"
archiveNumbering=