实例介绍
【实例简介】NLOG 代码
case 0:
return Trace;
case 1:
return Debug;
case 2:
return Info;
case 3:
return Warn;
case 4:
return Error;
case 5:
return Fatal;
case 6:
return Off;
可以记录6个等级的log

【核心代码】.
├── NLog
│ ├── AssemblyInfo.cs
│ ├── NLog
│ │ ├── ComInterop
│ │ │ ├── ComLogManager.cs
│ │ │ ├── ComLogger.cs
│ │ │ ├── IComLogManager.cs
│ │ │ └── IComLogger.cs
│ │ ├── Common
│ │ │ ├── AsyncContinuation.cs
│ │ │ ├── AsyncHelpers.cs
│ │ │ ├── AsyncLogEventInfo.cs
│ │ │ ├── AsynchronousAction!1.cs
│ │ │ ├── AsynchronousAction.cs
│ │ │ ├── InternalLogger.cs
│ │ │ └── LogEventInfoBuffer.cs
│ │ ├── Conditions
│ │ │ ├── ConditionAndExpression.cs
│ │ │ ├── ConditionEvaluationException.cs
│ │ │ ├── ConditionExpression.cs
│ │ │ ├── ConditionLayoutExpression.cs
│ │ │ ├── ConditionLevelExpression.cs
│ │ │ ├── ConditionLiteralExpression.cs
│ │ │ ├── ConditionLoggerNameExpression.cs
│ │ │ ├── ConditionMessageExpression.cs
│ │ │ ├── ConditionMethodAttribute.cs
│ │ │ ├── ConditionMethodExpression.cs
│ │ │ ├── ConditionMethods.cs
│ │ │ ├── ConditionMethodsAttribute.cs
│ │ │ ├── ConditionNotExpression.cs
│ │ │ ├── ConditionOrExpression.cs
│ │ │ ├── ConditionParseException.cs
│ │ │ ├── ConditionParser.cs
│ │ │ ├── ConditionRelationalExpression.cs
│ │ │ ├── ConditionRelationalOperator.cs
│ │ │ ├── ConditionTokenType.cs
│ │ │ └── ConditionTokenizer.cs
│ │ ├── Config
│ │ │ ├── AdvancedAttribute.cs
│ │ │ ├── AppDomainFixedOutputAttribute.cs
│ │ │ ├── ArrayParameterAttribute.cs
│ │ │ ├── ConfigSectionHandler.cs
│ │ │ ├── ConfigurationItemFactory.cs
│ │ │ ├── DefaultParameterAttribute.cs
│ │ │ ├── Factory!2.cs
│ │ │ ├── IFactory.cs
│ │ │ ├── IInstallable.cs
│ │ │ ├── INamedItemFactory!2.cs
│ │ │ ├── InstallationContext.cs
│ │ │ ├── LoggingConfiguration.cs
│ │ │ ├── LoggingConfigurationChangedEventArgs.cs
│ │ │ ├── LoggingConfigurationReloadedEventArgs.cs
│ │ │ ├── LoggingRule.cs
│ │ │ ├── MethodFactory!2.cs
│ │ │ ├── NLogConfigurationItemAttribute.cs
│ │ │ ├── NLogXmlElement.cs
│ │ │ ├── NameBaseAttribute.cs
│ │ │ ├── RequiredParameterAttribute.cs
│ │ │ ├── RuntimeOS.cs
│ │ │ ├── SimpleConfigurator.cs
│ │ │ ├── StackTraceUsage.cs
│ │ │ ├── ThreadAgnosticAttribute.cs
│ │ │ └── XmlLoggingConfiguration.cs
│ │ ├── Filters
│ │ │ ├── ConditionBasedFilter.cs
│ │ │ ├── Filter.cs
│ │ │ ├── FilterAttribute.cs
│ │ │ ├── FilterResult.cs
│ │ │ ├── LayoutBasedFilter.cs
│ │ │ ├── WhenContainsFilter.cs
│ │ │ ├── WhenEqualFilter.cs
│ │ │ ├── WhenNotContainsFilter.cs
│ │ │ └── WhenNotEqualFilter.cs
│ │ ├── GDC.cs
│ │ ├── GlobalDiagnosticsContext.cs
│ │ ├── Internal
│ │ │ ├── AspHelper.cs
│ │ │ ├── CurrentTimeGetter.cs
│ │ │ ├── DictionaryAdapter!2.cs
│ │ │ ├── EnumerableHelpers.cs
│ │ │ ├── EnvironmentHelper.cs
│ │ │ ├── ExceptionHelper.cs
│ │ │ ├── FactoryHelper.cs
│ │ │ ├── FileAppenders
│ │ │ │ ├── BaseFileAppender.cs
│ │ │ │ ├── CountingSingleProcessFileAppender.cs
│ │ │ │ ├── ICreateFileParameters.cs
│ │ │ │ ├── IFileAppenderFactory.cs
│ │ │ │ ├── MutexMultiProcessFileAppender.cs
│ │ │ │ ├── RetryingMultiProcessFileAppender.cs
│ │ │ │ └── SingleProcessFileAppender.cs
│ │ │ ├── FileInfoHelper.cs
│ │ │ ├── FormHelper.cs
│ │ │ ├── IRenderable.cs
│ │ │ ├── ISmtpClient.cs
│ │ │ ├── ISupportsInitialize.cs
│ │ │ ├── IUsesStackTrace.cs
│ │ │ ├── LoggerConfiguration.cs
│ │ │ ├── MultiFileWatcher.cs
│ │ │ ├── MySmtpClient.cs
│ │ │ ├── NativeMethods.cs
│ │ │ ├── NetworkSenders
│ │ │ │ ├── INetworkSenderFactory.cs
│ │ │ │ ├── ISocket.cs
│ │ │ │ ├── NetworkSender.cs
│ │ │ │ ├── NetworkSenderFactory.cs
│ │ │ │ ├── SocketProxy.cs
│ │ │ │ ├── TcpNetworkSender.cs
│ │ │ │ └── UdpNetworkSender.cs
│ │ │ ├── ObjectGraphScanner.cs
│ │ │ ├── ParameterUtils.cs
│ │ │ ├── PlatformDetector.cs
│ │ │ ├── PortableFileInfoHelper.cs
│ │ │ ├── PortableThreadIDHelper.cs
│ │ │ ├── PropertyHelper.cs
│ │ │ ├── SingleCallContinuation.cs
│ │ │ ├── SortHelpers.cs
│ │ │ ├── StackTraceUsageUtils.cs
│ │ │ ├── TargetWithFilterChain.cs
│ │ │ ├── ThreadIDHelper.cs
│ │ │ ├── TimeoutContinuation.cs
│ │ │ ├── UrlHelper.cs
│ │ │ ├── Win32FileInfoHelper.cs
│ │ │ ├── Win32FileNativeMethods.cs
│ │ │ └── Win32ThreadIDHelper.cs
│ │ ├── LayoutRenderers
│ │ │ ├── AmbientPropertyAttribute.cs
│ │ │ ├── AspApplicationValueLayoutRenderer.cs
│ │ │ ├── AspRequestValueLayoutRenderer.cs
│ │ │ ├── AspSessionValueLayoutRenderer.cs
│ │ │ ├── BaseDirLayoutRenderer.cs
│ │ │ ├── CallSiteLayoutRenderer.cs
│ │ │ ├── CounterLayoutRenderer.cs
│ │ │ ├── DateLayoutRenderer.cs
│ │ │ ├── EnvironmentLayoutRenderer.cs
│ │ │ ├── EventContextLayoutRenderer.cs
│ │ │ ├── ExceptionLayoutRenderer.cs
│ │ │ ├── FileContentsLayoutRenderer.cs
│ │ │ ├── GarbageCollectorInfoLayoutRenderer.cs
│ │ │ ├── GarbageCollectorProperty.cs
│ │ │ ├── GdcLayoutRenderer.cs
│ │ │ ├── GuidLayoutRenderer.cs
│ │ │ ├── IdentityLayoutRenderer.cs
│ │ │ ├── InstallContextLayoutRenderer.cs
│ │ │ ├── LayoutRenderer.cs
│ │ │ ├── LayoutRendererAttribute.cs
│ │ │ ├── LevelLayoutRenderer.cs
│ │ │ ├── LiteralLayoutRenderer.cs
│ │ │ ├── Log4JXmlEventLayoutRenderer.cs
│ │ │ ├── LoggerNameLayoutRenderer.cs
│ │ │ ├── LongDateLayoutRenderer.cs
│ │ │ ├── MachineNameLayoutRenderer.cs
│ │ │ ├── MdcLayoutRenderer.cs
│ │ │ ├── MessageLayoutRenderer.cs
│ │ │ ├── NLogDirLayoutRenderer.cs
│ │ │ ├── NdcLayoutRenderer.cs
│ │ │ ├── NewLineLayoutRenderer.cs
│ │ │ ├── PerformanceCounterLayoutRenderer.cs
│ │ │ ├── ProcessIdLayoutRenderer.cs
│ │ │ ├── ProcessInfoLayoutRenderer.cs
│ │ │ ├── ProcessInfoProperty.cs
│ │ │ ├── ProcessNameLayoutRenderer.cs
│ │ │ ├── ProcessTimeLayoutRenderer.cs
│ │ │ ├── QueryPerformanceCounterLayoutRenderer.cs
│ │ │ ├── RegistryLayoutRenderer.cs
│ │ │ ├── ShortDateLayoutRenderer.cs
│ │ │ ├── SilverlightApplicationInfoOption.cs
│ │ │ ├── SpecialFolderLayoutRenderer.cs
│ │ │ ├── StackTraceFormat.cs
│ │ │ ├── StackTraceLayoutRenderer.cs
│ │ │ ├── TempDirLayoutRenderer.cs
│ │ │ ├── ThreadIdLayoutRenderer.cs
│ │ │ ├── ThreadNameLayoutRenderer.cs
│ │ │ ├── TicksLayoutRenderer.cs
│ │ │ ├── WindowsIdentityLayoutRenderer.cs
│ │ │ └── Wrappers
│ │ │ ├── CachedLayoutRendererWrapper.cs
│ │ │ ├── LowercaseLayoutRendererWrapper.cs
│ │ │ ├── PaddingLayoutRendererWrapper.cs
│ │ │ ├── ReplaceLayoutRendererWrapper.cs
│ │ │ ├── Rot13LayoutRendererWrapper.cs
│ │ │ ├── TrimWhiteSpaceLayoutRendererWrapper.cs
│ │ │ ├── UppercaseLayoutRendererWrapper.cs
│ │ │ ├── UrlEncodeLayoutRendererWrapper.cs
│ │ │ └── WrapperLayoutRendererBase.cs
│ │ ├── Layouts
│ │ │ ├── CsvColumn.cs
│ │ │ ├── CsvColumnDelimiterMode.cs
│ │ │ ├── CsvLayout.cs
│ │ │ ├── CsvQuotingMode.cs
│ │ │ ├── Layout.cs
│ │ │ ├── LayoutAttribute.cs
│ │ │ ├── LayoutParser.cs
│ │ │ ├── LayoutWithHeaderAndFooter.cs
│ │ │ ├── Log4JXmlEventLayout.cs
│ │ │ └── SimpleLayout.cs
│ │ ├── LogEventInfo.cs
│ │ ├── LogFactory!1.cs
│ │ ├── LogFactory.cs
│ │ ├── LogLevel.cs
│ │ ├── LogManager.cs
│ │ ├── LogMessageGenerator.cs
│ │ ├── LogReceiverService
│ │ │ ├── ILogReceiverClient.cs
│ │ │ ├── ILogReceiverClientChannel.cs
│ │ │ ├── ILogReceiverServer.cs
│ │ │ ├── LogReceiverServiceConfig.cs
│ │ │ ├── NLogEvent.cs
│ │ │ ├── NLogEvents.cs
│ │ │ ├── StringCollection.cs
│ │ │ └── WcfLogReceiverClient.cs
│ │ ├── Logger.cs
│ │ ├── LoggerImpl.cs
│ │ ├── MDC.cs
│ │ ├── MappedDiagnosticsContext.cs
│ │ ├── NDC.cs
│ │ ├── NLogConfigurationException.cs
│ │ ├── NLogRuntimeException.cs
│ │ ├── NLogTraceListener.cs
│ │ ├── NestedDiagnosticsContext.cs
│ │ └── Targets
│ │ ├── ArchiveNumberingMode.cs
│ │ ├── AspResponseTarget.cs
│ │ ├── ChainsawTarget.cs
│ │ ├── ColoredConsoleTarget.cs
│ │ ├── ConsoleOutputColor.cs
│ │ ├── ConsoleRowHighlightingRule.cs
│ │ ├── ConsoleTarget.cs
│ │ ├── ConsoleWordHighlightingRule.cs
│ │ ├── DatabaseCommandInfo.cs
│ │ ├── DatabaseParameterInfo.cs
│ │ ├── DatabaseTarget.cs
│ │ ├── DebugTarget.cs
│ │ ├── DebuggerTarget.cs
│ │ ├── EventLogTarget.cs
│ │ ├── FileArchivePeriod.cs
│ │ ├── FileTarget.cs
│ │ ├── FormControlTarget.cs
│ │ ├── LineEndingMode.cs
│ │ ├── LogReceiverWebServiceTarget.cs
│ │ ├── MailTarget.cs
│ │ ├── MemoryTarget.cs
│ │ ├── MessageBoxTarget.cs
│ │ ├── MethodCallParameter.cs
│ │ ├── MethodCallTarget.cs
│ │ ├── MethodCallTargetBase.cs
│ │ ├── NLogViewerParameterInfo.cs
│ │ ├── NLogViewerTarget.cs
│ │ ├── NetworkTarget.cs
│ │ ├── NetworkTargetOverflowAction.cs
│ │ ├── NullTarget.cs
│ │ ├── OutputDebugStringTarget.cs
│ │ ├── PerformanceCounterTarget.cs
│ │ ├── RichTextBoxRowColoringRule.cs
│ │ ├── RichTextBoxTarget.cs
│ │ ├── RichTextBoxWordColoringRule.cs
│ │ ├── SmtpAuthenticationMode.cs
│ │ ├── Target.cs
│ │ ├── TargetAttribute.cs
│ │ ├── TargetWithLayout.cs
│ │ ├── TargetWithLayoutHeaderAndFooter.cs
│ │ ├── TraceTarget.cs
│ │ ├── WebServiceProtocol.cs
│ │ ├── WebServiceTarget.cs
│ │ ├── Win32FileAttributes.cs
│ │ └── Wrappers
│ │ ├── AsyncRequestQueue.cs
│ │ ├── AsyncTargetWrapper.cs
│ │ ├── AsyncTargetWrapperOverflowAction.cs
│ │ ├── AutoFlushTargetWrapper.cs
│ │ ├── BufferingTargetWrapper.cs
│ │ ├── CompoundTargetBase.cs
│ │ ├── FallbackGroupTarget.cs
│ │ ├── FilteringRule.cs
│ │ ├── FilteringTargetWrapper.cs
│ │ ├── ImpersonatingTargetWrapper.cs
│ │ ├── LogOnProviderType.cs
│ │ ├── PostFilteringTargetWrapper.cs
│ │ ├── RandomizeGroupTarget.cs
│ │ ├── RepeatingTargetWrapper.cs
│ │ ├── RetryingTargetWrapper.cs
│ │ ├── RoundRobinGroupTarget.cs
│ │ ├── SecurityImpersonationLevel.cs
│ │ ├── SecurityLogOnType.cs
│ │ ├── SplitGroupTarget.cs
│ │ └── WrapperTargetBase.cs
│ ├── NLog.Resources.NLog.ico
│ ├── NLog.csproj
│ ├── NLog.v12.suo
│ ├── bin
│ │ ├── Debug
│ │ │ ├── NLog.dll
│ │ │ └── NLog.pdb
│ │ └── Release
│ │ ├── NLog.dll
│ │ └── NLog.pdb
│ └── obj
│ └── x86
│ ├── Debug
│ │ ├── DesignTimeResolveAssemblyReferencesInput.cache
│ │ ├── NLog.csproj.CoreCompileInputs.cache
│ │ ├── NLog.csproj.FileListAbsolute.txt
│ │ ├── NLog.csprojAssemblyReference.cache
│ │ ├── NLog.csprojResolveAssemblyReference.cache
│ │ ├── NLog.dll
│ │ ├── NLog.pdb
│ │ └── TempPE
│ └── Release
│ ├── DesignTimeResolveAssemblyReferencesInput.cache
│ ├── NLog.csproj.FileListAbsolute.txt
│ ├── NLog.csprojResolveAssemblyReference.cache
│ ├── NLog.dll
│ ├── NLog.pdb
│ └── TempPE
└── 好例子网_NLog.rar
25 directories, 290 files
标签: NLog
小贴士
感谢您为本站写下的评论,您的评论对其它用户来说具有重要的参考价值,所以请认真填写。
- 类似“顶”、“沙发”之类没有营养的文字,对勤劳贡献的楼主来说是令人沮丧的反馈信息。
- 相信您也不想看到一排文字/表情墙,所以请不要反馈意义不大的重复字符,也请尽量不要纯表情的回复。
- 提问之前请再仔细看一遍楼主的说明,或许是您遗漏了。
- 请勿到处挖坑绊人、招贴广告。既占空间让人厌烦,又没人会搭理,于人于己都无利。
关于好例子网
本站旨在为广大IT学习爱好者提供一个非营利性互相学习交流分享平台。本站所有资源都可以被免费获取学习研究。本站资源来自网友分享,对搜索内容的合法性不具有预见性、识别性、控制性,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,平台无法对用户传输的作品、信息、内容的权属或合法性、安全性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论平台是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二与二十三条之规定,若资源存在侵权或相关问题请联系本站客服人员,点此联系我们。关于更多版权及免责申明参见 版权及免责申明
网友评论
我要评论