标签:图片 short cep framework com debug code deb tor
<?xml version="1.0" encoding="utf-8"?> <packages> <package id="NLog" version="4.5.2" targetFramework="net461" /> <package id="NLog.Config" version="4.5.2" targetFramework="net461" /> <package id="NLog.Schema" version="4.5.2" targetFramework="net461" /> </packages>
<?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="false" internalLogLevel="Off" internalLogFile="c:\temp\nlog-internal.log"> <targets> <target name="log_file" xsi:type="File" fileName="${basedir}/logs/${shortdate}.log" layout="${longdate} ${uppercase:${level}} ${message}" /> </targets> <rules> <logger name="*" minlevel="Debug" writeTo="log_file" /> </rules> </nlog>
class Program { private static Logger logger = LogManager.GetCurrentClassLogger(); static void Main(string[] args) { logger.Trace("Trace Message"); logger.Debug("Debug Message"); logger.Info("Info Message"); logger.Error("Error Message"); logger.Fatal("Fatal Message"); } }
标签:图片 short cep framework com debug code deb tor
原文地址:https://www.cnblogs.com/lgxlsm/p/8778028.html