nlog 1.0.0.505-mswin32
Sign up to get free protection for your applications and to get access to all the features.
- data/docs/LICENSE.txt +32 -0
- data/docs/NLog.chm +0 -0
- data/docs/NLogC FAQ.txt +23 -0
- data/docs/README.txt +29 -0
- data/docs/examples/ExtendingLoggers/InheritFromLogger/InheritFromLogger.csproj +53 -0
- data/docs/examples/ExtendingLoggers/InheritFromLogger/InheritFromLogger.sln +20 -0
- data/docs/examples/ExtendingLoggers/InheritFromLogger/NLog.config +16 -0
- data/docs/examples/ExtendingLoggers/InheritFromLogger/Program.cs +87 -0
- data/docs/examples/ExtendingLoggers/InheritFromLogger/Properties/AssemblyInfo.cs +33 -0
- data/docs/examples/ExtendingLoggers/LoggerWrapper/LoggerWrapper.csproj +53 -0
- data/docs/examples/ExtendingLoggers/LoggerWrapper/LoggerWrapper.sln +20 -0
- data/docs/examples/ExtendingLoggers/LoggerWrapper/NLog.config +12 -0
- data/docs/examples/ExtendingLoggers/LoggerWrapper/Program.cs +85 -0
- data/docs/examples/ExtendingLoggers/LoggerWrapper/Properties/AssemblyInfo.cs +33 -0
- data/docs/examples/ExtendingLoggers/README.html +39 -0
- data/docs/examples/targets/Configuration API/ASPNetBufferingWrapper/ASPNetBufferingWrapper.csproj +95 -0
- data/docs/examples/targets/Configuration API/ASPNetBufferingWrapper/ASPNetBufferingWrapper.sln +20 -0
- data/docs/examples/targets/Configuration API/ASPNetBufferingWrapper/Global.asax +1 -0
- data/docs/examples/targets/Configuration API/ASPNetBufferingWrapper/Global.asax.cs +40 -0
- data/docs/examples/targets/Configuration API/ASPNetBufferingWrapper/NormalPage.aspx +16 -0
- data/docs/examples/targets/Configuration API/ASPNetBufferingWrapper/NormalPage.aspx.cs +30 -0
- data/docs/examples/targets/Configuration API/ASPNetBufferingWrapper/NormalPage.aspx.designer.cs +18 -0
- data/docs/examples/targets/Configuration API/ASPNetBufferingWrapper/PageWithWarnings.aspx +16 -0
- data/docs/examples/targets/Configuration API/ASPNetBufferingWrapper/PageWithWarnings.aspx.cs +32 -0
- data/docs/examples/targets/Configuration API/ASPNetBufferingWrapper/PageWithWarnings.aspx.designer.cs +18 -0
- data/docs/examples/targets/Configuration API/ASPNetBufferingWrapper/Properties/AssemblyInfo.cs +10 -0
- data/docs/examples/targets/Configuration API/ASPNetBufferingWrapper/Web.config +22 -0
- data/docs/examples/targets/Configuration API/ASPNetTrace/ASPNetTraceTest.csproj +130 -0
- data/docs/examples/targets/Configuration API/ASPNetTrace/ASPNetTraceTest.sln +20 -0
- data/docs/examples/targets/Configuration API/ASPNetTrace/Global.asax.cs +25 -0
- data/docs/examples/targets/Configuration API/ASPNetTrace/README.txt +4 -0
- data/docs/examples/targets/Configuration API/ASPNetTrace/global.asax +1 -0
- data/docs/examples/targets/Configuration API/ASPNetTrace/test.aspx +23 -0
- data/docs/examples/targets/Configuration API/ASPNetTrace/web.config +8 -0
- data/docs/examples/targets/Configuration API/All_Targets.sln +320 -0
- data/docs/examples/targets/Configuration API/AsyncWrapper/Wrapping File/AsyncWrapper.Wrapping File.csproj +39 -0
- data/docs/examples/targets/Configuration API/AsyncWrapper/Wrapping File/AsyncWrapper.Wrapping File.sln +20 -0
- data/docs/examples/targets/Configuration API/AsyncWrapper/Wrapping File/Example.cs +27 -0
- data/docs/examples/targets/Configuration API/AutoFlushWrapper/Simple/AutoFlushWrapper.csproj +40 -0
- data/docs/examples/targets/Configuration API/AutoFlushWrapper/Simple/AutoFlushWrapper.sln +20 -0
- data/docs/examples/targets/Configuration API/AutoFlushWrapper/Simple/Example.cs +23 -0
- data/docs/examples/targets/Configuration API/BufferingWrapper/Simple/BufferingWrapper.csproj +40 -0
- data/docs/examples/targets/Configuration API/BufferingWrapper/Simple/BufferingWrapper.sln +20 -0
- data/docs/examples/targets/Configuration API/BufferingWrapper/Simple/Example.cs +24 -0
- data/docs/examples/targets/Configuration API/Chainsaw/Simple/Chainsaw.csproj +39 -0
- data/docs/examples/targets/Configuration API/Chainsaw/Simple/Chainsaw.sln +20 -0
- data/docs/examples/targets/Configuration API/Chainsaw/Simple/Example.cs +21 -0
- data/docs/examples/targets/Configuration API/ColoredConsole/Row Highlighting/ColoredConsole.Row Highlighting.csproj +39 -0
- data/docs/examples/targets/Configuration API/ColoredConsole/Row Highlighting/ColoredConsole.Row Highlighting.sln +20 -0
- data/docs/examples/targets/Configuration API/ColoredConsole/Row Highlighting/Example.cs +44 -0
- data/docs/examples/targets/Configuration API/ColoredConsole/Simple/ColoredConsole.csproj +39 -0
- data/docs/examples/targets/Configuration API/ColoredConsole/Simple/ColoredConsole.sln +20 -0
- data/docs/examples/targets/Configuration API/ColoredConsole/Simple/Example.cs +21 -0
- data/docs/examples/targets/Configuration API/ColoredConsole/Word Highlighting/ColoredConsole.Word Highlighting.csproj +39 -0
- data/docs/examples/targets/Configuration API/ColoredConsole/Word Highlighting/ColoredConsole.Word Highlighting.sln +20 -0
- data/docs/examples/targets/Configuration API/ColoredConsole/Word Highlighting/Example.cs +30 -0
- data/docs/examples/targets/Configuration API/Console/Simple/Console.csproj +39 -0
- data/docs/examples/targets/Configuration API/Console/Simple/Console.sln +20 -0
- data/docs/examples/targets/Configuration API/Console/Simple/Example.cs +16 -0
- data/docs/examples/targets/Configuration API/Database/MSSQL/Database.MSSQL.csproj +39 -0
- data/docs/examples/targets/Configuration API/Database/MSSQL/Database.MSSQL.sln +20 -0
- data/docs/examples/targets/Configuration API/Database/MSSQL/Example.cs +43 -0
- data/docs/examples/targets/Configuration API/Database/Oracle.Native/Database.Oracle.Native.csproj +40 -0
- data/docs/examples/targets/Configuration API/Database/Oracle.Native/Database.Oracle.Native.sln +20 -0
- data/docs/examples/targets/Configuration API/Database/Oracle.Native/Example.cs +28 -0
- data/docs/examples/targets/Configuration API/Database/Oracle.OleDb/Database.Oracle.OleDb.csproj +40 -0
- data/docs/examples/targets/Configuration API/Database/Oracle.OleDb/Database.Oracle.OleDb.sln +20 -0
- data/docs/examples/targets/Configuration API/Database/Oracle.OleDb/Example.cs +26 -0
- data/docs/examples/targets/Configuration API/Debug/Simple/Debug.csproj +39 -0
- data/docs/examples/targets/Configuration API/Debug/Simple/Debug.sln +20 -0
- data/docs/examples/targets/Configuration API/Debug/Simple/Example.cs +22 -0
- data/docs/examples/targets/Configuration API/Debugger/Simple/Debugger.csproj +39 -0
- data/docs/examples/targets/Configuration API/Debugger/Simple/Debugger.sln +20 -0
- data/docs/examples/targets/Configuration API/Debugger/Simple/Example.cs +18 -0
- data/docs/examples/targets/Configuration API/EventLog/Simple/EventLog.csproj +39 -0
- data/docs/examples/targets/Configuration API/EventLog/Simple/EventLog.sln +20 -0
- data/docs/examples/targets/Configuration API/EventLog/Simple/Example.cs +20 -0
- data/docs/examples/targets/Configuration API/FallbackGroup/Simple/Example.cs +31 -0
- data/docs/examples/targets/Configuration API/FallbackGroup/Simple/FallbackGroup.csproj +40 -0
- data/docs/examples/targets/Configuration API/FallbackGroup/Simple/FallbackGroup.sln +20 -0
- data/docs/examples/targets/Configuration API/File/Archive1/Example.cs +29 -0
- data/docs/examples/targets/Configuration API/File/Archive1/File.Archive1.csproj +39 -0
- data/docs/examples/targets/Configuration API/File/Archive1/File.Archive1.sln +20 -0
- data/docs/examples/targets/Configuration API/File/Archive2/Example.cs +46 -0
- data/docs/examples/targets/Configuration API/File/Archive2/File.Archive2.csproj +39 -0
- data/docs/examples/targets/Configuration API/File/Archive2/File.Archive2.sln +20 -0
- data/docs/examples/targets/Configuration API/File/Archive3/Example.cs +50 -0
- data/docs/examples/targets/Configuration API/File/Archive3/File.Archive3.csproj +39 -0
- data/docs/examples/targets/Configuration API/File/Archive3/File.Archive3.sln +20 -0
- data/docs/examples/targets/Configuration API/File/Archive4/Example.cs +63 -0
- data/docs/examples/targets/Configuration API/File/Archive4/File.Archive4.csproj +39 -0
- data/docs/examples/targets/Configuration API/File/Archive4/File.Archive4.sln +20 -0
- data/docs/examples/targets/Configuration API/File/Asynchronous/Example.cs +25 -0
- data/docs/examples/targets/Configuration API/File/Asynchronous/File.Asynchronous.csproj +39 -0
- data/docs/examples/targets/Configuration API/File/Asynchronous/File.Asynchronous.sln +20 -0
- data/docs/examples/targets/Configuration API/File/CSV/Example.cs +29 -0
- data/docs/examples/targets/Configuration API/File/CSV/File.CSV.csproj +39 -0
- data/docs/examples/targets/Configuration API/File/CSV/File.CSV.sln +20 -0
- data/docs/examples/targets/Configuration API/File/Multiple/Example.cs +19 -0
- data/docs/examples/targets/Configuration API/File/Multiple/File.Multiple.csproj +39 -0
- data/docs/examples/targets/Configuration API/File/Multiple/File.Multiple.sln +20 -0
- data/docs/examples/targets/Configuration API/File/Multiple2/Example.cs +19 -0
- data/docs/examples/targets/Configuration API/File/Multiple2/File.Multiple2.csproj +39 -0
- data/docs/examples/targets/Configuration API/File/Multiple2/File.Multiple2.sln +20 -0
- data/docs/examples/targets/Configuration API/File/Simple/Example.cs +19 -0
- data/docs/examples/targets/Configuration API/File/Simple/File.csproj +39 -0
- data/docs/examples/targets/Configuration API/File/Simple/File.sln +20 -0
- data/docs/examples/targets/Configuration API/FilteringWrapper/Simple/Example.cs +28 -0
- data/docs/examples/targets/Configuration API/FilteringWrapper/Simple/FilteringWrapper.csproj +40 -0
- data/docs/examples/targets/Configuration API/FilteringWrapper/Simple/FilteringWrapper.sln +20 -0
- data/docs/examples/targets/Configuration API/FormControl/Example.cs +22 -0
- data/docs/examples/targets/Configuration API/FormControl/Form1.Designer.cs +62 -0
- data/docs/examples/targets/Configuration API/FormControl/Form1.cs +36 -0
- data/docs/examples/targets/Configuration API/FormControl/Form1.resx +120 -0
- data/docs/examples/targets/Configuration API/FormControl/FormControl.csproj +81 -0
- data/docs/examples/targets/Configuration API/FormControl/FormControl.sln +20 -0
- data/docs/examples/targets/Configuration API/FormControl/Properties/AssemblyInfo.cs +33 -0
- data/docs/examples/targets/Configuration API/FormControl/Properties/Resources.Designer.cs +71 -0
- data/docs/examples/targets/Configuration API/FormControl/Properties/Resources.resx +117 -0
- data/docs/examples/targets/Configuration API/FormControl/Properties/Settings.Designer.cs +30 -0
- data/docs/examples/targets/Configuration API/FormControl/Properties/Settings.settings +7 -0
- data/docs/examples/targets/Configuration API/MSMQ/Multiple Queues/Example.cs +28 -0
- data/docs/examples/targets/Configuration API/MSMQ/Multiple Queues/MSMQ.Multiple Queues.csproj +39 -0
- data/docs/examples/targets/Configuration API/MSMQ/Multiple Queues/MSMQ.Multiple Queues.sln +20 -0
- data/docs/examples/targets/Configuration API/MSMQ/Simple/Example.cs +28 -0
- data/docs/examples/targets/Configuration API/MSMQ/Simple/MSMQ.csproj +39 -0
- data/docs/examples/targets/Configuration API/MSMQ/Simple/MSMQ.sln +20 -0
- data/docs/examples/targets/Configuration API/Mail/Buffered/Example.cs +48 -0
- data/docs/examples/targets/Configuration API/Mail/Buffered/Mail.Buffered.csproj +39 -0
- data/docs/examples/targets/Configuration API/Mail/Buffered/Mail.Buffered.sln +20 -0
- data/docs/examples/targets/Configuration API/Mail/Simple/Example.cs +33 -0
- data/docs/examples/targets/Configuration API/Mail/Simple/Mail.csproj +39 -0
- data/docs/examples/targets/Configuration API/Mail/Simple/Mail.sln +20 -0
- data/docs/examples/targets/Configuration API/Memory/Simple/Example.cs +23 -0
- data/docs/examples/targets/Configuration API/Memory/Simple/Memory.csproj +39 -0
- data/docs/examples/targets/Configuration API/Memory/Simple/Memory.sln +20 -0
- data/docs/examples/targets/Configuration API/MessageBox/Simple/Example.cs +19 -0
- data/docs/examples/targets/Configuration API/MessageBox/Simple/MessageBox.csproj +39 -0
- data/docs/examples/targets/Configuration API/MessageBox/Simple/MessageBox.sln +20 -0
- data/docs/examples/targets/Configuration API/MethodCall/Simple/Example.cs +27 -0
- data/docs/examples/targets/Configuration API/MethodCall/Simple/MethodCall.csproj +39 -0
- data/docs/examples/targets/Configuration API/MethodCall/Simple/MethodCall.sln +20 -0
- data/docs/examples/targets/Configuration API/NLogViewer/Simple/Example.cs +21 -0
- data/docs/examples/targets/Configuration API/NLogViewer/Simple/NLogViewer.csproj +39 -0
- data/docs/examples/targets/Configuration API/NLogViewer/Simple/NLogViewer.sln +20 -0
- data/docs/examples/targets/Configuration API/Network/Simple/Example.cs +22 -0
- data/docs/examples/targets/Configuration API/Network/Simple/Network.csproj +39 -0
- data/docs/examples/targets/Configuration API/Network/Simple/Network.sln +20 -0
- data/docs/examples/targets/Configuration API/Null/Simple/Example.cs +19 -0
- data/docs/examples/targets/Configuration API/Null/Simple/Null.csproj +40 -0
- data/docs/examples/targets/Configuration API/Null/Simple/Null.sln +20 -0
- data/docs/examples/targets/Configuration API/OutputDebugString/Simple/Example.cs +19 -0
- data/docs/examples/targets/Configuration API/OutputDebugString/Simple/OutputDebugString.csproj +40 -0
- data/docs/examples/targets/Configuration API/OutputDebugString/Simple/OutputDebugString.sln +20 -0
- data/docs/examples/targets/Configuration API/PerfCounter/Simple/Example.cs +24 -0
- data/docs/examples/targets/Configuration API/PerfCounter/Simple/PerfCounter.csproj +40 -0
- data/docs/examples/targets/Configuration API/PerfCounter/Simple/PerfCounter.sln +20 -0
- data/docs/examples/targets/Configuration API/PostFilteringWrapper/Simple/Example.cs +41 -0
- data/docs/examples/targets/Configuration API/PostFilteringWrapper/Simple/PostFilteringWrapper.csproj +40 -0
- data/docs/examples/targets/Configuration API/PostFilteringWrapper/Simple/PostFilteringWrapper.sln +20 -0
- data/docs/examples/targets/Configuration API/RandomizeGroup/Simple/Example.cs +27 -0
- data/docs/examples/targets/Configuration API/RandomizeGroup/Simple/RandomizeGroup.csproj +40 -0
- data/docs/examples/targets/Configuration API/RandomizeGroup/Simple/RandomizeGroup.sln +20 -0
- data/docs/examples/targets/Configuration API/RepeatingWrapper/Simple/Example.cs +24 -0
- data/docs/examples/targets/Configuration API/RepeatingWrapper/Simple/RepeatingWrapper.csproj +40 -0
- data/docs/examples/targets/Configuration API/RepeatingWrapper/Simple/RepeatingWrapper.sln +20 -0
- data/docs/examples/targets/Configuration API/RetryingWrapper/Simple/Example.cs +25 -0
- data/docs/examples/targets/Configuration API/RetryingWrapper/Simple/RetryingWrapper.csproj +40 -0
- data/docs/examples/targets/Configuration API/RetryingWrapper/Simple/RetryingWrapper.sln +20 -0
- data/docs/examples/targets/Configuration API/RichTextBox/RowColoring/Example.cs +22 -0
- data/docs/examples/targets/Configuration API/RichTextBox/RowColoring/Form1.Designer.cs +61 -0
- data/docs/examples/targets/Configuration API/RichTextBox/RowColoring/Form1.cs +46 -0
- data/docs/examples/targets/Configuration API/RichTextBox/RowColoring/Form1.resx +120 -0
- data/docs/examples/targets/Configuration API/RichTextBox/RowColoring/Properties/AssemblyInfo.cs +33 -0
- data/docs/examples/targets/Configuration API/RichTextBox/RowColoring/Properties/Resources.Designer.cs +71 -0
- data/docs/examples/targets/Configuration API/RichTextBox/RowColoring/Properties/Resources.resx +117 -0
- data/docs/examples/targets/Configuration API/RichTextBox/RowColoring/Properties/Settings.Designer.cs +30 -0
- data/docs/examples/targets/Configuration API/RichTextBox/RowColoring/Properties/Settings.settings +7 -0
- data/docs/examples/targets/Configuration API/RichTextBox/RowColoring/RichTextBox.RowColoring.csproj +81 -0
- data/docs/examples/targets/Configuration API/RichTextBox/RowColoring/RichTextBox.RowColoring.sln +20 -0
- data/docs/examples/targets/Configuration API/RichTextBox/Simple/Example.cs +22 -0
- data/docs/examples/targets/Configuration API/RichTextBox/Simple/Form1.Designer.cs +61 -0
- data/docs/examples/targets/Configuration API/RichTextBox/Simple/Form1.cs +36 -0
- data/docs/examples/targets/Configuration API/RichTextBox/Simple/Form1.resx +120 -0
- data/docs/examples/targets/Configuration API/RichTextBox/Simple/Properties/AssemblyInfo.cs +33 -0
- data/docs/examples/targets/Configuration API/RichTextBox/Simple/Properties/Resources.Designer.cs +71 -0
- data/docs/examples/targets/Configuration API/RichTextBox/Simple/Properties/Resources.resx +117 -0
- data/docs/examples/targets/Configuration API/RichTextBox/Simple/Properties/Settings.Designer.cs +30 -0
- data/docs/examples/targets/Configuration API/RichTextBox/Simple/Properties/Settings.settings +7 -0
- data/docs/examples/targets/Configuration API/RichTextBox/Simple/RichTextBox.csproj +81 -0
- data/docs/examples/targets/Configuration API/RichTextBox/Simple/RichTextBox.sln +20 -0
- data/docs/examples/targets/Configuration API/RichTextBox/WordColoring/Example.cs +22 -0
- data/docs/examples/targets/Configuration API/RichTextBox/WordColoring/Form1.Designer.cs +61 -0
- data/docs/examples/targets/Configuration API/RichTextBox/WordColoring/Form1.cs +46 -0
- data/docs/examples/targets/Configuration API/RichTextBox/WordColoring/Form1.resx +120 -0
- data/docs/examples/targets/Configuration API/RichTextBox/WordColoring/Properties/AssemblyInfo.cs +33 -0
- data/docs/examples/targets/Configuration API/RichTextBox/WordColoring/Properties/Resources.Designer.cs +71 -0
- data/docs/examples/targets/Configuration API/RichTextBox/WordColoring/Properties/Resources.resx +117 -0
- data/docs/examples/targets/Configuration API/RichTextBox/WordColoring/Properties/Settings.Designer.cs +30 -0
- data/docs/examples/targets/Configuration API/RichTextBox/WordColoring/Properties/Settings.settings +7 -0
- data/docs/examples/targets/Configuration API/RichTextBox/WordColoring/RichTextBox.WordColoring.csproj +81 -0
- data/docs/examples/targets/Configuration API/RichTextBox/WordColoring/RichTextBox.WordColoring.sln +20 -0
- data/docs/examples/targets/Configuration API/RoundRobinGroup/Simple/Example.cs +27 -0
- data/docs/examples/targets/Configuration API/RoundRobinGroup/Simple/RoundRobinGroup.csproj +40 -0
- data/docs/examples/targets/Configuration API/RoundRobinGroup/Simple/RoundRobinGroup.sln +20 -0
- data/docs/examples/targets/Configuration API/SplitGroup/Simple/Example.cs +27 -0
- data/docs/examples/targets/Configuration API/SplitGroup/Simple/SplitGroup.csproj +40 -0
- data/docs/examples/targets/Configuration API/SplitGroup/Simple/SplitGroup.sln +20 -0
- data/docs/examples/targets/Configuration API/Template.csproj +39 -0
- data/docs/examples/targets/Configuration API/Template.sln +20 -0
- data/docs/examples/targets/Configuration API/Trace/Simple/Example.cs +21 -0
- data/docs/examples/targets/Configuration API/Trace/Simple/Trace.csproj +40 -0
- data/docs/examples/targets/Configuration API/Trace/Simple/Trace.sln +20 -0
- data/docs/examples/targets/Configuration API/WebService/Simple/Example.cs +28 -0
- data/docs/examples/targets/Configuration API/WebService/Simple/WebService.csproj +39 -0
- data/docs/examples/targets/Configuration API/WebService/Simple/WebService.sln +26 -0
- data/docs/examples/targets/Configuration API/WebService/Simple/WebService1/Properties/AssemblyInfo.cs +13 -0
- data/docs/examples/targets/Configuration API/WebService/Simple/WebService1/Service1.asmx +1 -0
- data/docs/examples/targets/Configuration API/WebService/Simple/WebService1/Service1.asmx.cs +24 -0
- data/docs/examples/targets/Configuration API/WebService/Simple/WebService1/Web.config +36 -0
- data/docs/examples/targets/Configuration API/WebService/Simple/WebService1/WebService1.csproj +77 -0
- data/docs/examples/targets/Configuration API/makeproject.pl +37 -0
- data/docs/examples/targets/Configuration File/ASPNetBufferingWrapper/web.nlog +15 -0
- data/docs/examples/targets/Configuration File/ASPNetTrace/web.nlog +10 -0
- data/docs/examples/targets/Configuration File/AsyncWrapper/NLog.config +17 -0
- data/docs/examples/targets/Configuration File/AutoFlushWrapper/NLog.config +13 -0
- data/docs/examples/targets/Configuration File/BufferingWrapper/NLog.config +13 -0
- data/docs/examples/targets/Configuration File/Chainsaw/NLog.config +11 -0
- data/docs/examples/targets/Configuration File/ColoredConsole/Row Highlighting/NLog.config +14 -0
- data/docs/examples/targets/Configuration File/ColoredConsole/Simple/NLog.config +12 -0
- data/docs/examples/targets/Configuration File/ColoredConsole/Word Highlighting/NLog.config +14 -0
- data/docs/examples/targets/Configuration File/Console/NLog.config +11 -0
- data/docs/examples/targets/Configuration File/Database/MSSQL/NLog.config +30 -0
- data/docs/examples/targets/Configuration File/Database/MSSQL/create_nlog_database.bat +21 -0
- data/docs/examples/targets/Configuration File/Database/MSSQL/create_nlog_database.sql +35 -0
- data/docs/examples/targets/Configuration File/Database/MSSQL/drop_nlog_database.bat +19 -0
- data/docs/examples/targets/Configuration File/Database/MSSQL/drop_nlog_database.sql +4 -0
- data/docs/examples/targets/Configuration File/Database/Oracle.Native/NLog.config +23 -0
- data/docs/examples/targets/Configuration File/Database/Oracle.OleDb/NLog.config +22 -0
- data/docs/examples/targets/Configuration File/Debug/NLog.config +11 -0
- data/docs/examples/targets/Configuration File/Debugger/NLog.config +11 -0
- data/docs/examples/targets/Configuration File/EventLog/NLog.config +11 -0
- data/docs/examples/targets/Configuration File/FallbackGroup/NLog.config +14 -0
- data/docs/examples/targets/Configuration File/File/Archive1/NLog.config +20 -0
- data/docs/examples/targets/Configuration File/File/Archive2/NLog.config +20 -0
- data/docs/examples/targets/Configuration File/File/Archive3/NLog.config +22 -0
- data/docs/examples/targets/Configuration File/File/Archive4/NLog.config +22 -0
- data/docs/examples/targets/Configuration File/File/Asynchronous/NLog.config +18 -0
- data/docs/examples/targets/Configuration File/File/CSV/NLog.config +18 -0
- data/docs/examples/targets/Configuration File/File/Multiple/NLog.config +14 -0
- data/docs/examples/targets/Configuration File/File/Multiple2/NLog.config +14 -0
- data/docs/examples/targets/Configuration File/File/Simple/NLog.config +16 -0
- data/docs/examples/targets/Configuration File/FilteringWrapper/NLog.config +13 -0
- data/docs/examples/targets/Configuration File/FormControl/NLog.config +12 -0
- data/docs/examples/targets/Configuration File/MSMQ/Multiple/NLog.config +17 -0
- data/docs/examples/targets/Configuration File/MSMQ/Simple/NLog.config +17 -0
- data/docs/examples/targets/Configuration File/Mail/Buffered/NLog.config +18 -0
- data/docs/examples/targets/Configuration File/Mail/Simple/NLog.config +16 -0
- data/docs/examples/targets/Configuration File/Memory/NLog.config +11 -0
- data/docs/examples/targets/Configuration File/MessageBox/NLog.config +11 -0
- data/docs/examples/targets/Configuration File/MethodCall/NLog.config +14 -0
- data/docs/examples/targets/Configuration File/NLogViewer/NLog.config +11 -0
- data/docs/examples/targets/Configuration File/Network/NLog.config +11 -0
- data/docs/examples/targets/Configuration File/Null/NLog.config +11 -0
- data/docs/examples/targets/Configuration File/OutputDebugString/NLog.config +11 -0
- data/docs/examples/targets/Configuration File/PerfCounter/NLog.config +12 -0
- data/docs/examples/targets/Configuration File/PostFilteringWrapper/NLog.config +16 -0
- data/docs/examples/targets/Configuration File/RandomizeGroup/NLog.config +14 -0
- data/docs/examples/targets/Configuration File/RepeatingWrapper/NLog.config +13 -0
- data/docs/examples/targets/Configuration File/RetryingWrapper/NLog.config +13 -0
- data/docs/examples/targets/Configuration File/RichTextBox/RowColoring/NLog.config +14 -0
- data/docs/examples/targets/Configuration File/RichTextBox/Simple/NLog.config +12 -0
- data/docs/examples/targets/Configuration File/RichTextBox/WordColoring/NLog.config +14 -0
- data/docs/examples/targets/Configuration File/RoundRobinGroup/NLog.config +14 -0
- data/docs/examples/targets/Configuration File/SplitGroup/NLog.config +14 -0
- data/docs/examples/targets/Configuration File/Trace/NLog.config +11 -0
- data/docs/examples/targets/Configuration File/WebService/NLog.config +17 -0
- data/docs/examples/targets/Configuration File/WebService/WebService1/Properties/AssemblyInfo.cs +13 -0
- data/docs/examples/targets/Configuration File/WebService/WebService1/Service1.asmx +1 -0
- data/docs/examples/targets/Configuration File/WebService/WebService1/Service1.asmx.cs +24 -0
- data/docs/examples/targets/Configuration File/WebService/WebService1/Web.config +36 -0
- data/docs/examples/targets/Configuration File/WebService/WebService1/WebService1.csproj +77 -0
- data/docs/examples/targets/Configuration File/WebService/WebService1/WebService1.sln +20 -0
- data/docs/examples/targets/Screenshots/ASPNetTrace/ASPNetTraceOutput1.gif +0 -0
- data/docs/examples/targets/Screenshots/ASPNetTrace/ASPNetTraceOutput2.gif +0 -0
- data/docs/examples/targets/Screenshots/ColoredConsole/Row Highlighting.gif +0 -0
- data/docs/examples/targets/Screenshots/ColoredConsole/Simple.gif +0 -0
- data/docs/examples/targets/Screenshots/ColoredConsole/Word Highlighting.gif +0 -0
- data/docs/examples/targets/Screenshots/FormControl/FormControl.gif +0 -0
- data/docs/examples/targets/Screenshots/MessageBox/MessageBoxTarget.gif +0 -0
- data/docs/examples/targets/Screenshots/Network/Output.gif +0 -0
- data/docs/examples/targets/Screenshots/RichTextBox/RowColoring.gif +0 -0
- data/docs/examples/targets/Screenshots/RichTextBox/Simple.gif +0 -0
- data/docs/examples/targets/Screenshots/RichTextBox/WordColoring.gif +0 -0
- data/docs/examples/web/AddFilter.cs +6 -0
- data/docs/examples/web/AddLayoutRenderer.cs +6 -0
- data/docs/examples/web/AddTarget.cs +6 -0
- data/docs/examples/web/GetCurrentClassLogger.cs +11 -0
- data/docs/examples/web/GetLogger.cs +11 -0
- data/docs/examples/web/MyFirstFilter.cs +35 -0
- data/docs/examples/web/MyFirstLayoutRenderer.cs +41 -0
- data/docs/examples/web/MyFirstTarget.cs +28 -0
- data/docs/examples/web/NLogC.cpp +26 -0
- data/docs/examples/web/NLogCdef.cpp +28 -0
- data/docs/examples/web/Performance.cs +16 -0
- data/docs/examples/web/app.config +10 -0
- data/docs/examples/web/article1.cs +21 -0
- data/docs/examples/web/article2.cs +33 -0
- data/docs/examples/web/article3.nlog +9 -0
- data/docs/examples/web/article4.nlog +9 -0
- data/docs/examples/web/article5.nlog +24 -0
- data/docs/examples/web/article6.nlog +7 -0
- data/docs/examples/web/benchmark_log4net.cs +30 -0
- data/docs/examples/web/benchmark_nlog.cs +29 -0
- data/docs/examples/web/config1.nlog +4 -0
- data/docs/examples/web/config10.nlog +18 -0
- data/docs/examples/web/config11.nlog +14 -0
- data/docs/examples/web/config12.nlog +4 -0
- data/docs/examples/web/config2.nlog +3 -0
- data/docs/examples/web/config3.nlog +24 -0
- data/docs/examples/web/config4.nlog +25 -0
- data/docs/examples/web/config5.nlog +10 -0
- data/docs/examples/web/config6.nlog +23 -0
- data/docs/examples/web/config7.nlog +14 -0
- data/docs/examples/web/config8.nlog +9 -0
- data/docs/examples/web/config8a.nlog +9 -0
- data/docs/examples/web/config9.nlog +14 -0
- data/docs/examples/web/test.js +44 -0
- data/docs/examples/web/test.vbs +46 -0
- data/docs/examples/web/tutorial.cs +37 -0
- data/lib/Mono 1.0/NLog.dll +0 -0
- data/lib/Mono 1.0/NLog.xml +12948 -0
- data/lib/Mono 1.0/NLog.xsd +1566 -0
- data/lib/Mono 1.0/Policy.1.0.NLog.dll +0 -0
- data/lib/Mono 1.0/Policy.1.0.NLog.xml +11 -0
- data/lib/Mono 2.0/NLog.dll +0 -0
- data/lib/Mono 2.0/NLog.xml +12969 -0
- data/lib/Mono 2.0/NLog.xsd +1566 -0
- data/lib/Mono 2.0/Policy.1.0.NLog.dll +0 -0
- data/lib/Mono 2.0/Policy.1.0.NLog.xml +11 -0
- metadata +410 -0
data/docs/LICENSE.txt
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
|
2
|
+
Copyright (c) 2004-2009 Jaroslaw Kowalski <jaak@jkowalski.net>
|
3
|
+
|
4
|
+
All rights reserved.
|
5
|
+
|
6
|
+
Redistribution and use in source and binary forms, with or without
|
7
|
+
modification, are permitted provided that the following conditions
|
8
|
+
are met:
|
9
|
+
|
10
|
+
* Redistributions of source code must retain the above copyright notice,
|
11
|
+
this list of conditions and the following disclaimer.
|
12
|
+
|
13
|
+
* Redistributions in binary form must reproduce the above copyright notice,
|
14
|
+
this list of conditions and the following disclaimer in the documentation
|
15
|
+
and/or other materials provided with the distribution.
|
16
|
+
|
17
|
+
* Neither the name of Jaroslaw Kowalski nor the names of its
|
18
|
+
contributors may be used to endorse or promote products derived from this
|
19
|
+
software without specific prior written permission.
|
20
|
+
|
21
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
22
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
23
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
24
|
+
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
25
|
+
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
26
|
+
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
27
|
+
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
28
|
+
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
29
|
+
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
30
|
+
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
31
|
+
THE POSSIBILITY OF SUCH DAMAGE.
|
32
|
+
|
data/docs/NLog.chm
ADDED
Binary file
|
data/docs/NLogC FAQ.txt
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
Mini FAQ:
|
2
|
+
|
3
|
+
1. Which binaries should I use?
|
4
|
+
===============================
|
5
|
+
|
6
|
+
Make sure to choose the version that matches your compiler and .NET version.
|
7
|
+
Make sure to put the NLog.dll in the same directory where NLogC.dll is located.
|
8
|
+
|
9
|
+
2. How to compile?
|
10
|
+
==================
|
11
|
+
|
12
|
+
That's simple: just add #include "NLogC.h" and link with "NLogC.lib"
|
13
|
+
|
14
|
+
3. Where should I put the config file?
|
15
|
+
======================================
|
16
|
+
|
17
|
+
The reliable way is to put the configuration in "NLog.dll.nlog" file in the same
|
18
|
+
directory where NLog.dll is located.
|
19
|
+
|
20
|
+
Other options depend on your host application. For example, if are writing
|
21
|
+
a ASP.NET application that calls back to C++ code you may also use Web.config
|
22
|
+
and/org Web.nlog.
|
23
|
+
|
data/docs/README.txt
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
About NLog
|
2
|
+
----------
|
3
|
+
NLog is a logging platform for .NET with rich log routing and management
|
4
|
+
capabilities. It makes it easy to produce and manage high-quality logs
|
5
|
+
for your application regardless of its size or complexity.
|
6
|
+
|
7
|
+
NLog can process diagnostic messages emitted from any .NET language, augment
|
8
|
+
them with contextual information, format them according to your preference
|
9
|
+
and send them to one or more targets such as file or database.
|
10
|
+
|
11
|
+
NLog supports .NET, C/C++ and COM interop API so that all your application components
|
12
|
+
including legacy modules written in C++/COM can send their messages through a common
|
13
|
+
log routing engine.
|
14
|
+
|
15
|
+
Website
|
16
|
+
-------
|
17
|
+
To download the latest version of NLog, go to http://www.nlog-project.org/
|
18
|
+
|
19
|
+
Support
|
20
|
+
-------
|
21
|
+
The following support options are available:
|
22
|
+
|
23
|
+
* NLog Forum - http://www.nlog-project.org/forum.html
|
24
|
+
* Issue Tracker - http://www.nlog-project.org/issuetracker.html
|
25
|
+
* Mailing List - http://www.nlog-project.org/mailinglists.html
|
26
|
+
|
27
|
+
License
|
28
|
+
-------
|
29
|
+
NLog is licensed under the terms of BSD license. See LICENSE.txt for details.
|
@@ -0,0 +1,53 @@
|
|
1
|
+
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
2
|
+
<PropertyGroup>
|
3
|
+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
4
|
+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
5
|
+
<ProductVersion>8.0.50727</ProductVersion>
|
6
|
+
<SchemaVersion>2.0</SchemaVersion>
|
7
|
+
<ProjectGuid>{E9EC09E9-F6F6-4CEA-923C-A8D580BF73D9}</ProjectGuid>
|
8
|
+
<OutputType>Exe</OutputType>
|
9
|
+
<AppDesignerFolder>Properties</AppDesignerFolder>
|
10
|
+
<RootNamespace>InheritFromLogger</RootNamespace>
|
11
|
+
<AssemblyName>InheritFromLogger</AssemblyName>
|
12
|
+
</PropertyGroup>
|
13
|
+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
14
|
+
<DebugSymbols>true</DebugSymbols>
|
15
|
+
<DebugType>full</DebugType>
|
16
|
+
<Optimize>false</Optimize>
|
17
|
+
<OutputPath>bin\Debug\</OutputPath>
|
18
|
+
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
19
|
+
<ErrorReport>prompt</ErrorReport>
|
20
|
+
<WarningLevel>4</WarningLevel>
|
21
|
+
</PropertyGroup>
|
22
|
+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
23
|
+
<DebugType>pdbonly</DebugType>
|
24
|
+
<Optimize>true</Optimize>
|
25
|
+
<OutputPath>bin\Release\</OutputPath>
|
26
|
+
<DefineConstants>TRACE</DefineConstants>
|
27
|
+
<ErrorReport>prompt</ErrorReport>
|
28
|
+
<WarningLevel>4</WarningLevel>
|
29
|
+
</PropertyGroup>
|
30
|
+
<ItemGroup>
|
31
|
+
<Reference Include="NLog, Version=1.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL" />
|
32
|
+
<Reference Include="System" />
|
33
|
+
<Reference Include="System.Data" />
|
34
|
+
<Reference Include="System.Xml" />
|
35
|
+
</ItemGroup>
|
36
|
+
<ItemGroup>
|
37
|
+
<Compile Include="Program.cs" />
|
38
|
+
<Compile Include="Properties\AssemblyInfo.cs" />
|
39
|
+
</ItemGroup>
|
40
|
+
<ItemGroup>
|
41
|
+
<None Include="NLog.config">
|
42
|
+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
43
|
+
</None>
|
44
|
+
</ItemGroup>
|
45
|
+
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
46
|
+
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
47
|
+
Other similar extension points exist, see Microsoft.Common.targets.
|
48
|
+
<Target Name="BeforeBuild">
|
49
|
+
</Target>
|
50
|
+
<Target Name="AfterBuild">
|
51
|
+
</Target>
|
52
|
+
-->
|
53
|
+
</Project>
|
@@ -0,0 +1,20 @@
|
|
1
|
+
|
2
|
+
Microsoft Visual Studio Solution File, Format Version 9.00
|
3
|
+
# Visual Studio 2005
|
4
|
+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "InheritFromLogger", "InheritFromLogger.csproj", "{E9EC09E9-F6F6-4CEA-923C-A8D580BF73D9}"
|
5
|
+
EndProject
|
6
|
+
Global
|
7
|
+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
8
|
+
Debug|Any CPU = Debug|Any CPU
|
9
|
+
Release|Any CPU = Release|Any CPU
|
10
|
+
EndGlobalSection
|
11
|
+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
12
|
+
{E9EC09E9-F6F6-4CEA-923C-A8D580BF73D9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
13
|
+
{E9EC09E9-F6F6-4CEA-923C-A8D580BF73D9}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
14
|
+
{E9EC09E9-F6F6-4CEA-923C-A8D580BF73D9}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
15
|
+
{E9EC09E9-F6F6-4CEA-923C-A8D580BF73D9}.Release|Any CPU.Build.0 = Release|Any CPU
|
16
|
+
EndGlobalSection
|
17
|
+
GlobalSection(SolutionProperties) = preSolution
|
18
|
+
HideSolutionNode = FALSE
|
19
|
+
EndGlobalSection
|
20
|
+
EndGlobal
|
@@ -0,0 +1,16 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8" ?>
|
2
|
+
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
|
3
|
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
4
|
+
|
5
|
+
<targets>
|
6
|
+
<target name="eventlog"
|
7
|
+
xsi:type="EventLog"
|
8
|
+
eventID="${event-context:EventID}"
|
9
|
+
source="NLog Example"
|
10
|
+
layout="${message}" />
|
11
|
+
</targets>
|
12
|
+
|
13
|
+
<rules>
|
14
|
+
<logger name="*" minlevel="Debug" writeTo="eventlog" />
|
15
|
+
</rules>
|
16
|
+
</nlog>
|
@@ -0,0 +1,87 @@
|
|
1
|
+
//
|
2
|
+
// Copyright (c) 2004-2006 Jaroslaw Kowalski <jaak@jkowalski.net>
|
3
|
+
//
|
4
|
+
// All rights reserved.
|
5
|
+
//
|
6
|
+
// Redistribution and use in source and binary forms, with or without
|
7
|
+
// modification, are permitted provided that the following conditions
|
8
|
+
// are met:
|
9
|
+
//
|
10
|
+
// * Redistributions of source code must retain the above copyright notice,
|
11
|
+
// this list of conditions and the following disclaimer.
|
12
|
+
//
|
13
|
+
// * Redistributions in binary form must reproduce the above copyright notice,
|
14
|
+
// this list of conditions and the following disclaimer in the documentation
|
15
|
+
// and/or other materials provided with the distribution.
|
16
|
+
//
|
17
|
+
// * Neither the name of Jaroslaw Kowalski nor the names of its
|
18
|
+
// contributors may be used to endorse or promote products derived from this
|
19
|
+
// software without specific prior written permission.
|
20
|
+
//
|
21
|
+
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
22
|
+
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
23
|
+
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
24
|
+
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
25
|
+
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
26
|
+
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
27
|
+
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
28
|
+
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
29
|
+
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
30
|
+
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
31
|
+
// THE POSSIBILITY OF SUCH DAMAGE.
|
32
|
+
//
|
33
|
+
|
34
|
+
using System;
|
35
|
+
using System.Text;
|
36
|
+
using NLog;
|
37
|
+
|
38
|
+
namespace InheritFromLogger
|
39
|
+
{
|
40
|
+
/// <summary>
|
41
|
+
/// Provides methods to write messages with event IDs - useful for the Event Log target
|
42
|
+
/// Inherits from the Logger class.
|
43
|
+
/// </summary>
|
44
|
+
public class LoggerWithEventID : Logger
|
45
|
+
{
|
46
|
+
public LoggerWithEventID()
|
47
|
+
{
|
48
|
+
}
|
49
|
+
|
50
|
+
// additional method that takes eventID as an argument
|
51
|
+
public void DebugWithEventID(int eventID, string message, params object[] args)
|
52
|
+
{
|
53
|
+
if (IsDebugEnabled)
|
54
|
+
{
|
55
|
+
// create log event
|
56
|
+
LogEventInfo lei = new LogEventInfo(LogLevel.Debug, Name, null, message, args);
|
57
|
+
|
58
|
+
// set the per-log context data
|
59
|
+
// this data can be retrieved using ${event-context:EventID}
|
60
|
+
lei.Context["EventID"] = eventID;
|
61
|
+
|
62
|
+
// log the message
|
63
|
+
base.Log(typeof(LoggerWithEventID), lei);
|
64
|
+
}
|
65
|
+
}
|
66
|
+
|
67
|
+
// other methods omitted for brevity
|
68
|
+
}
|
69
|
+
|
70
|
+
class Program
|
71
|
+
{
|
72
|
+
// get the current class logger as an instance of LoggerWithEventID class
|
73
|
+
|
74
|
+
private static LoggerWithEventID LoggerWithEventID = (LoggerWithEventID)LogManager.GetCurrentClassLogger(typeof(LoggerWithEventID));
|
75
|
+
|
76
|
+
static void Main(string[] args)
|
77
|
+
{
|
78
|
+
// this writes 5 messages to the Event Log, each with a different EventID
|
79
|
+
|
80
|
+
LoggerWithEventID.DebugWithEventID(123, "message 1", 1, 2, 3);
|
81
|
+
LoggerWithEventID.DebugWithEventID(124, "message 2", 1, 2, 3);
|
82
|
+
LoggerWithEventID.DebugWithEventID(125, "message 3", 1, 2, 3);
|
83
|
+
LoggerWithEventID.DebugWithEventID(126, "message 4", 1, 2, 3);
|
84
|
+
LoggerWithEventID.DebugWithEventID(127, "message 5", 1, 2, 3);
|
85
|
+
}
|
86
|
+
}
|
87
|
+
}
|
@@ -0,0 +1,33 @@
|
|
1
|
+
using System.Reflection;
|
2
|
+
using System.Runtime.CompilerServices;
|
3
|
+
using System.Runtime.InteropServices;
|
4
|
+
|
5
|
+
// General Information about an assembly is controlled through the following
|
6
|
+
// set of attributes. Change these attribute values to modify the information
|
7
|
+
// associated with an assembly.
|
8
|
+
[assembly: AssemblyTitle("InheritFromLogger")]
|
9
|
+
[assembly: AssemblyDescription("")]
|
10
|
+
[assembly: AssemblyConfiguration("")]
|
11
|
+
[assembly: AssemblyCompany("")]
|
12
|
+
[assembly: AssemblyProduct("InheritFromLogger")]
|
13
|
+
[assembly: AssemblyCopyright("Copyright © Jaroslaw Kowalski. 2006")]
|
14
|
+
[assembly: AssemblyTrademark("")]
|
15
|
+
[assembly: AssemblyCulture("")]
|
16
|
+
|
17
|
+
// Setting ComVisible to false makes the types in this assembly not visible
|
18
|
+
// to COM components. If you need to access a type in this assembly from
|
19
|
+
// COM, set the ComVisible attribute to true on that type.
|
20
|
+
[assembly: ComVisible(false)]
|
21
|
+
|
22
|
+
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
23
|
+
[assembly: Guid("6be26d09-c79f-4572-8890-68b70d4fd193")]
|
24
|
+
|
25
|
+
// Version information for an assembly consists of the following four values:
|
26
|
+
//
|
27
|
+
// Major Version
|
28
|
+
// Minor Version
|
29
|
+
// Build Number
|
30
|
+
// Revision
|
31
|
+
//
|
32
|
+
[assembly: AssemblyVersion("1.0.0.0")]
|
33
|
+
[assembly: AssemblyFileVersion("1.0.0.0")]
|
@@ -0,0 +1,53 @@
|
|
1
|
+
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
2
|
+
<PropertyGroup>
|
3
|
+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
4
|
+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
5
|
+
<ProductVersion>8.0.50727</ProductVersion>
|
6
|
+
<SchemaVersion>2.0</SchemaVersion>
|
7
|
+
<ProjectGuid>{B8526875-5F24-4225-A93D-B4FE6099F616}</ProjectGuid>
|
8
|
+
<OutputType>Exe</OutputType>
|
9
|
+
<AppDesignerFolder>Properties</AppDesignerFolder>
|
10
|
+
<RootNamespace>LoggerWrapper</RootNamespace>
|
11
|
+
<AssemblyName>LoggerWrapper</AssemblyName>
|
12
|
+
</PropertyGroup>
|
13
|
+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
14
|
+
<DebugSymbols>true</DebugSymbols>
|
15
|
+
<DebugType>full</DebugType>
|
16
|
+
<Optimize>false</Optimize>
|
17
|
+
<OutputPath>bin\Debug\</OutputPath>
|
18
|
+
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
19
|
+
<ErrorReport>prompt</ErrorReport>
|
20
|
+
<WarningLevel>4</WarningLevel>
|
21
|
+
</PropertyGroup>
|
22
|
+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
23
|
+
<DebugType>pdbonly</DebugType>
|
24
|
+
<Optimize>true</Optimize>
|
25
|
+
<OutputPath>bin\Release\</OutputPath>
|
26
|
+
<DefineConstants>TRACE</DefineConstants>
|
27
|
+
<ErrorReport>prompt</ErrorReport>
|
28
|
+
<WarningLevel>4</WarningLevel>
|
29
|
+
</PropertyGroup>
|
30
|
+
<ItemGroup>
|
31
|
+
<Reference Include="NLog, Version=1.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL" />
|
32
|
+
<Reference Include="System" />
|
33
|
+
<Reference Include="System.Data" />
|
34
|
+
<Reference Include="System.Xml" />
|
35
|
+
</ItemGroup>
|
36
|
+
<ItemGroup>
|
37
|
+
<Compile Include="Program.cs" />
|
38
|
+
<Compile Include="Properties\AssemblyInfo.cs" />
|
39
|
+
</ItemGroup>
|
40
|
+
<ItemGroup>
|
41
|
+
<None Include="NLog.config">
|
42
|
+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
43
|
+
</None>
|
44
|
+
</ItemGroup>
|
45
|
+
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
46
|
+
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
47
|
+
Other similar extension points exist, see Microsoft.Common.targets.
|
48
|
+
<Target Name="BeforeBuild">
|
49
|
+
</Target>
|
50
|
+
<Target Name="AfterBuild">
|
51
|
+
</Target>
|
52
|
+
-->
|
53
|
+
</Project>
|
@@ -0,0 +1,20 @@
|
|
1
|
+
|
2
|
+
Microsoft Visual Studio Solution File, Format Version 9.00
|
3
|
+
# Visual Studio 2005
|
4
|
+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LoggerWrapper", "LoggerWrapper.csproj", "{B8526875-5F24-4225-A93D-B4FE6099F616}"
|
5
|
+
EndProject
|
6
|
+
Global
|
7
|
+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
8
|
+
Debug|Any CPU = Debug|Any CPU
|
9
|
+
Release|Any CPU = Release|Any CPU
|
10
|
+
EndGlobalSection
|
11
|
+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
12
|
+
{B8526875-5F24-4225-A93D-B4FE6099F616}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
13
|
+
{B8526875-5F24-4225-A93D-B4FE6099F616}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
14
|
+
{B8526875-5F24-4225-A93D-B4FE6099F616}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
15
|
+
{B8526875-5F24-4225-A93D-B4FE6099F616}.Release|Any CPU.Build.0 = Release|Any CPU
|
16
|
+
EndGlobalSection
|
17
|
+
GlobalSection(SolutionProperties) = preSolution
|
18
|
+
HideSolutionNode = FALSE
|
19
|
+
EndGlobalSection
|
20
|
+
EndGlobal
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8" ?>
|
2
|
+
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
|
3
|
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
4
|
+
|
5
|
+
<targets>
|
6
|
+
<target name="console" xsi:type="Console" layout="${callsite} ${message}" />
|
7
|
+
</targets>
|
8
|
+
|
9
|
+
<rules>
|
10
|
+
<logger name="*" minlevel="Debug" writeTo="console" />
|
11
|
+
</rules>
|
12
|
+
</nlog>
|
@@ -0,0 +1,85 @@
|
|
1
|
+
//
|
2
|
+
// Copyright (c) 2004-2006 Jaroslaw Kowalski <jaak@jkowalski.net>
|
3
|
+
//
|
4
|
+
// All rights reserved.
|
5
|
+
//
|
6
|
+
// Redistribution and use in source and binary forms, with or without
|
7
|
+
// modification, are permitted provided that the following conditions
|
8
|
+
// are met:
|
9
|
+
//
|
10
|
+
// * Redistributions of source code must retain the above copyright notice,
|
11
|
+
// this list of conditions and the following disclaimer.
|
12
|
+
//
|
13
|
+
// * Redistributions in binary form must reproduce the above copyright notice,
|
14
|
+
// this list of conditions and the following disclaimer in the documentation
|
15
|
+
// and/or other materials provided with the distribution.
|
16
|
+
//
|
17
|
+
// * Neither the name of Jaroslaw Kowalski nor the names of its
|
18
|
+
// contributors may be used to endorse or promote products derived from this
|
19
|
+
// software without specific prior written permission.
|
20
|
+
//
|
21
|
+
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
22
|
+
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
23
|
+
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
24
|
+
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
25
|
+
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
26
|
+
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
27
|
+
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
28
|
+
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
29
|
+
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
30
|
+
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
31
|
+
// THE POSSIBILITY OF SUCH DAMAGE.
|
32
|
+
//
|
33
|
+
|
34
|
+
using System;
|
35
|
+
using System.Text;
|
36
|
+
using NLog;
|
37
|
+
|
38
|
+
namespace LoggerWrapper
|
39
|
+
{
|
40
|
+
/// <summary>
|
41
|
+
/// Provides methods to write messages with event IDs - useful for the Event Log target.
|
42
|
+
/// Wraps a Logger instance.
|
43
|
+
/// </summary>
|
44
|
+
class MyLogger
|
45
|
+
{
|
46
|
+
private Logger _logger;
|
47
|
+
|
48
|
+
public MyLogger(string name)
|
49
|
+
{
|
50
|
+
_logger = LogManager.GetLogger(name);
|
51
|
+
}
|
52
|
+
|
53
|
+
public void WriteMessage(string eventID, string message)
|
54
|
+
{
|
55
|
+
///
|
56
|
+
/// create log event from the passed message
|
57
|
+
///
|
58
|
+
LogEventInfo logEvent = new LogEventInfo(LogLevel.Info, _logger.Name, message);
|
59
|
+
|
60
|
+
//
|
61
|
+
// set event-specific context parameter
|
62
|
+
// this context parameter can be retrieved using ${event-context:EventID}
|
63
|
+
//
|
64
|
+
logEvent.Context["EventID"] = eventID;
|
65
|
+
|
66
|
+
//
|
67
|
+
// Call the Log() method. It is important to pass typeof(MyLogger) as the
|
68
|
+
// first parameter. If you don't, ${callsite} and other callstack-related
|
69
|
+
// layout renderers will not work properly.
|
70
|
+
//
|
71
|
+
|
72
|
+
_logger.Log(typeof(MyLogger), logEvent);
|
73
|
+
}
|
74
|
+
}
|
75
|
+
|
76
|
+
class Program
|
77
|
+
{
|
78
|
+
static void Main(string[] args)
|
79
|
+
{
|
80
|
+
MyLogger l = new MyLogger("uuu");
|
81
|
+
|
82
|
+
l.WriteMessage("1234", "message");
|
83
|
+
}
|
84
|
+
}
|
85
|
+
}
|