├── .gitattributes ├── .gitignore ├── .nuget ├── NuGet.Config ├── NuGet.exe └── NuGet.targets ├── AzureTableStorageNLogTarget.1.0.11.nupkg ├── License.txt ├── NLog.Extensions.AzureTableStorage.Tests ├── App.config ├── AzureStorageTableNameValidatorTests.cs ├── AzureTableStorageTargetTests.cs ├── Helpers.cs ├── NLog.Extensions.AzureTableStorage.Tests.csproj ├── NLog.config ├── NLog.xsd ├── Properties │ └── AssemblyInfo.cs └── packages.config ├── NLog.Extensions.AzureTableStorage ├── AzureStorageTableNameValidator.cs ├── AzureTableStorageTarget.cs ├── ConfigManager.cs ├── LogEntity.cs ├── NLog.Extensions.AzureTableStorage.csproj ├── Properties │ └── AssemblyInfo.cs ├── TableStorageManager.cs ├── app.config └── packages.config ├── NLog.Extensions.sln └── README.md /.gitattributes: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Set default behavior to automatically normalize line endings. 3 | ############################################################################### 4 | * text=auto 5 | 6 | ############################################################################### 7 | # Set default behavior for command prompt diff. 8 | # 9 | # This is need for earlier builds of msysgit that does not have it on by 10 | # default for csharp files. 11 | # Note: This is only used by command line 12 | ############################################################################### 13 | #*.cs diff=csharp 14 | 15 | ############################################################################### 16 | # Set the merge driver for project and solution files 17 | # 18 | # Merging from the command prompt will add diff markers to the files if there 19 | # are conflicts (Merging from VS is not affected by the settings below, in VS 20 | # the diff markers are never inserted). Diff markers may cause the following 21 | # file extensions to fail to load in VS. An alternative would be to treat 22 | # these files as binary and thus will always conflict and require user 23 | # intervention with every merge. To do so, just uncomment the entries below 24 | ############################################################################### 25 | #*.sln merge=binary 26 | #*.csproj merge=binary 27 | #*.vbproj merge=binary 28 | #*.vcxproj merge=binary 29 | #*.vcproj merge=binary 30 | #*.dbproj merge=binary 31 | #*.fsproj merge=binary 32 | #*.lsproj merge=binary 33 | #*.wixproj merge=binary 34 | #*.modelproj merge=binary 35 | #*.sqlproj merge=binary 36 | #*.wwaproj merge=binary 37 | 38 | ############################################################################### 39 | # behavior for image files 40 | # 41 | # image files are treated as binary by default. 42 | ############################################################################### 43 | #*.jpg binary 44 | #*.png binary 45 | #*.gif binary 46 | 47 | ############################################################################### 48 | # diff behavior for common document formats 49 | # 50 | # Convert binary document formats to text before diffing them. This feature 51 | # is only available from the command line. Turn it on by uncommenting the 52 | # entries below. 53 | ############################################################################### 54 | #*.doc diff=astextplain 55 | #*.DOC diff=astextplain 56 | #*.docx diff=astextplain 57 | #*.DOCX diff=astextplain 58 | #*.dot diff=astextplain 59 | #*.DOT diff=astextplain 60 | #*.pdf diff=astextplain 61 | #*.PDF diff=astextplain 62 | #*.rtf diff=astextplain 63 | #*.RTF diff=astextplain 64 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | 4 | # User-specific files 5 | *.suo 6 | *.user 7 | *.sln.docstates 8 | 9 | # Build results 10 | 11 | [Dd]ebug/ 12 | [Rr]elease/ 13 | x64/ 14 | build/ 15 | [Bb]in/ 16 | [Oo]bj/ 17 | 18 | # MSTest test Results 19 | [Tt]est[Rr]esult*/ 20 | [Bb]uild[Ll]og.* 21 | 22 | *_i.c 23 | *_p.c 24 | *.ilk 25 | *.meta 26 | *.obj 27 | *.pch 28 | *.pdb 29 | *.pgc 30 | *.pgd 31 | *.rsp 32 | *.sbr 33 | *.tlb 34 | *.tli 35 | *.tlh 36 | *.tmp 37 | *.tmp_proj 38 | *.log 39 | *.vspscc 40 | *.vssscc 41 | .builds 42 | *.pidb 43 | *.log 44 | *.scc 45 | 46 | # Visual C++ cache files 47 | ipch/ 48 | *.aps 49 | *.ncb 50 | *.opensdf 51 | *.sdf 52 | *.cachefile 53 | 54 | # Visual Studio profiler 55 | *.psess 56 | *.vsp 57 | *.vspx 58 | 59 | # Guidance Automation Toolkit 60 | *.gpState 61 | 62 | # ReSharper is a .NET coding add-in 63 | _ReSharper*/ 64 | *.[Rr]e[Ss]harper 65 | 66 | # TeamCity is a build add-in 67 | _TeamCity* 68 | 69 | # DotCover is a Code Coverage Tool 70 | *.dotCover 71 | 72 | # NCrunch 73 | *.ncrunch* 74 | .*crunch*.local.xml 75 | 76 | # Installshield output folder 77 | [Ee]xpress/ 78 | 79 | # DocProject is a documentation generator add-in 80 | DocProject/buildhelp/ 81 | DocProject/Help/*.HxT 82 | DocProject/Help/*.HxC 83 | DocProject/Help/*.hhc 84 | DocProject/Help/*.hhk 85 | DocProject/Help/*.hhp 86 | DocProject/Help/Html2 87 | DocProject/Help/html 88 | 89 | # Click-Once directory 90 | publish/ 91 | 92 | # Publish Web Output 93 | *.Publish.xml 94 | 95 | # NuGet Packages Directory 96 | ## TODO: If you have NuGet Package Restore enabled, uncomment the next line 97 | #packages/ 98 | 99 | # Windows Azure Build Output 100 | csx 101 | *.build.csdef 102 | 103 | # Windows Store app package directory 104 | AppPackages/ 105 | 106 | # Others 107 | sql/ 108 | *.Cache 109 | ClientBin/ 110 | [Ss]tyle[Cc]op.* 111 | ~$* 112 | *~ 113 | *.dbmdl 114 | *.[Pp]ublish.xml 115 | *.pfx 116 | *.publishsettings 117 | 118 | # RIA/Silverlight projects 119 | Generated_Code/ 120 | 121 | # Backup & report files from converting an old project file to a newer 122 | # Visual Studio version. Backup files are not needed, because we have git ;-) 123 | _UpgradeReport_Files/ 124 | Backup*/ 125 | UpgradeLog*.XML 126 | UpgradeLog*.htm 127 | 128 | # SQL Server files 129 | App_Data/*.mdf 130 | App_Data/*.ldf 131 | 132 | 133 | #LightSwitch generated files 134 | GeneratedArtifacts/ 135 | _Pvt_Extensions/ 136 | ModelManifest.xml 137 | 138 | # ========================= 139 | # Windows detritus 140 | # ========================= 141 | 142 | # Windows image file caches 143 | Thumbs.db 144 | ehthumbs.db 145 | 146 | # Folder config file 147 | Desktop.ini 148 | 149 | # Recycle Bin used on file shares 150 | $RECYCLE.BIN/ 151 | 152 | # Mac desktop service store files 153 | .DS_Store 154 | packages/ 155 | -------------------------------------------------------------------------------- /.nuget/NuGet.Config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.nuget/NuGet.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/harouny/NLog.Extensions.AzureTableStorage/92dfde81202139385f50b19e92bbe390209592d4/.nuget/NuGet.exe -------------------------------------------------------------------------------- /.nuget/NuGet.targets: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | $(MSBuildProjectDirectory)\..\ 5 | 6 | 7 | false 8 | 9 | 10 | false 11 | 12 | 13 | true 14 | 15 | 16 | false 17 | 18 | 19 | 20 | 21 | 22 | 26 | 27 | 28 | 29 | 30 | $([System.IO.Path]::Combine($(SolutionDir), ".nuget")) 31 | 32 | 33 | 34 | 35 | $(SolutionDir).nuget 36 | 37 | 38 | 39 | packages.$(MSBuildProjectName.Replace(' ', '_')).config 40 | 41 | 42 | 43 | 44 | 45 | $(PackagesProjectConfig) 46 | 47 | 48 | 49 | 50 | packages.config 51 | 52 | 53 | 54 | 55 | 56 | 57 | $(NuGetToolsPath)\NuGet.exe 58 | @(PackageSource) 59 | 60 | "$(NuGetExePath)" 61 | mono --runtime=v4.0.30319 $(NuGetExePath) 62 | 63 | $(TargetDir.Trim('\\')) 64 | 65 | -RequireConsent 66 | -NonInteractive 67 | 68 | "$(SolutionDir) " 69 | "$(SolutionDir)" 70 | 71 | 72 | $(NuGetCommand) install "$(PackagesConfig)" -source "$(PackageSources)" $(NonInteractiveSwitch) $(RequireConsentSwitch) -solutionDir $(PaddedSolutionDir) 73 | $(NuGetCommand) pack "$(ProjectPath)" -Properties "Configuration=$(Configuration);Platform=$(Platform)" $(NonInteractiveSwitch) -OutputDirectory "$(PackageOutputDir)" -symbols 74 | 75 | 76 | 77 | RestorePackages; 78 | $(BuildDependsOn); 79 | 80 | 81 | 82 | 83 | $(BuildDependsOn); 84 | BuildPackage; 85 | 86 | 87 | 88 | 89 | 90 | 91 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 106 | 107 | 110 | 111 | 112 | 113 | 115 | 116 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 148 | 149 | 150 | 151 | 152 | -------------------------------------------------------------------------------- /AzureTableStorageNLogTarget.1.0.11.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/harouny/NLog.Extensions.AzureTableStorage/92dfde81202139385f50b19e92bbe390209592d4/AzureTableStorageNLogTarget.1.0.11.nupkg -------------------------------------------------------------------------------- /License.txt: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 Ahmed Elharouny 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /NLog.Extensions.AzureTableStorage.Tests/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /NLog.Extensions.AzureTableStorage.Tests/AzureStorageTableNameValidatorTests.cs: -------------------------------------------------------------------------------- 1 | using Xunit; 2 | 3 | namespace NLog.Extensions.AzureTableStorage.Tests 4 | { 5 | public class AzureStorageTableNameValidatorTests 6 | { 7 | [Fact] 8 | public void IsValidReturnFalseIfTableNameIsReservedWord() 9 | { 10 | var validator = new AzureStorageTableNameValidator("tables"); //reserved (invalid) 11 | Assert.False(validator.IsValid()); 12 | } 13 | 14 | 15 | [Fact] 16 | public void IsValidReturnFalseIfTableNameVaiolatesRules_number() 17 | { 18 | var validator = new AzureStorageTableNameValidator("5");//invalid 19 | Assert.False(validator.IsValid()); 20 | } 21 | 22 | 23 | [Fact] 24 | public void IsValidReturnFalseIfTableNameVaiolatesRules_startsWithNumber() 25 | { 26 | var validator = new AzureStorageTableNameValidator("5products");//invalid 27 | Assert.False(validator.IsValid()); 28 | } 29 | 30 | 31 | [Fact] 32 | public void IsValidReturnFalseIfTableNameVaiolatesRules_containSpaces() 33 | { 34 | var validator = new AzureStorageTableNameValidator("products and customers");//invalid 35 | Assert.False(validator.IsValid()); 36 | } 37 | 38 | 39 | [Fact] 40 | public void IsValidReturnTrueIfTableNameIsValid() 41 | { 42 | var validator = new AzureStorageTableNameValidator("myTable");//valid name 43 | Assert.True(validator.IsValid()); 44 | } 45 | 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /NLog.Extensions.AzureTableStorage.Tests/AzureTableStorageTargetTests.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Azure; 2 | using Microsoft.WindowsAzure.Storage; 3 | using Microsoft.WindowsAzure.Storage.Table; 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using Xunit; 8 | 9 | namespace NLog.Extensions.AzureTableStorage.Tests 10 | { 11 | public class AzureTableStorageTargetTests : IDisposable 12 | { 13 | private readonly Logger _logger; 14 | private readonly CloudTable _cloudTable; 15 | private const string TargetTableName = "TempAzureTableStorageTargetTestsLogs"; //must match table name in AzureTableStorage target in NLog.config 16 | 17 | public AzureTableStorageTargetTests() 18 | { 19 | try 20 | { 21 | _logger = LogManager.GetLogger(GetType().ToString()); 22 | var storageAccount = GetStorageAccount(); 23 | // Create the table client. 24 | var tableClient = storageAccount.CreateCloudTableClient(); 25 | //create charts table if not exists. 26 | _cloudTable = tableClient.GetTableReference(TargetTableName); 27 | _cloudTable.CreateIfNotExists(); 28 | } 29 | catch (Exception ex) 30 | { 31 | throw new Exception("Failed to initialize tests, make sure Azure Storage Emulator is running.", ex); 32 | } 33 | 34 | } 35 | 36 | [Fact] 37 | public void CanLogInformation() 38 | { 39 | Assert.True(GetLogEntities().Count == 0); 40 | _logger.Log(LogLevel.Info, "information"); 41 | var entities = GetLogEntities(); 42 | var entity = entities.Single(); 43 | Assert.True(entities.Count == 1); 44 | Assert.Equal("information", entity.Message); 45 | Assert.Equal("Info", entity.Level); 46 | Assert.Equal(GetType().ToString(), entity.LoggerName); 47 | } 48 | 49 | [Fact] 50 | public void CanLogExceptions() 51 | { 52 | Assert.True(GetLogEntities().Count == 0); 53 | _logger.Log(LogLevel.Error, "exception message", (Exception)new NullReferenceException()); 54 | var entities = GetLogEntities(); 55 | var entity = entities.Single(); 56 | Assert.True(entities.Count == 1); 57 | Assert.Equal("exception message", entity.Message); 58 | Assert.Equal("Error", entity.Level); 59 | Assert.Equal(GetType().ToString(), entity.LoggerName); 60 | Assert.NotNull(entity.Exception); 61 | } 62 | 63 | [Fact] 64 | public void IncludeExceptionFormattedMessengerInLoggedRow() 65 | { 66 | _logger.Debug("exception message {0} and {1}.", 2010, 2014); 67 | var entity = GetLogEntities().Single(); 68 | Assert.Equal("exception message 2010 and 2014.", entity.Message); 69 | } 70 | 71 | [Fact] 72 | public void IncludeExceptionDataInLoggedRow() 73 | { 74 | var exception = new NullReferenceException(); 75 | var errorId = Guid.NewGuid(); 76 | exception.Data["id"] = errorId; 77 | exception.Data["name"] = "ahmed"; 78 | _logger.Log(LogLevel.Error, "execption messege", (Exception)exception); 79 | var entities = GetLogEntities(); 80 | var entity = entities.Single(); 81 | Assert.True(entity.ExceptionData.Contains(errorId.ToString())); 82 | Assert.True(entity.ExceptionData.Contains("name=ahmed")); 83 | } 84 | 85 | 86 | [Fact] 87 | public void IncludeExceptionDetailsInLoggedRow() 88 | { 89 | var exception = new NullReferenceException(); 90 | _logger.Log(LogLevel.Error, "execption messege", (Exception)exception); 91 | var entity = GetLogEntities().Single(); 92 | Assert.NotNull(entity.Exception); 93 | Assert.Equal(exception.ToString().ExceptBlanks(), entity.Exception.ExceptBlanks()); 94 | } 95 | 96 | 97 | [Fact] 98 | public void IncludeInnerExceptionDetailsInLoggedRow() 99 | { 100 | var exception = new NullReferenceException("exception message", new DivideByZeroException()); 101 | _logger.Log(LogLevel.Error, "execption messege", (Exception)exception); 102 | var entity = GetLogEntities().Single(); 103 | Assert.NotNull(entity.Exception); 104 | Assert.Equal(exception.ToString().ExceptBlanks(), entity.Exception.ExceptBlanks()); 105 | Assert.NotNull(entity.InnerException); 106 | Assert.Equal(exception.InnerException.ToString().ExceptBlanks(), entity.InnerException.ExceptBlanks()); 107 | } 108 | 109 | [Fact] 110 | public void IncludePartitionKeyPrefix() 111 | { 112 | var exception = new NullReferenceException(); 113 | _logger.Log(LogLevel.Error, "execption messege", (Exception)exception); 114 | var entity = GetLogEntities().Single(); 115 | Assert.True(entity.PartitionKey.Contains("customPrefix")); 116 | } 117 | 118 | [Fact] 119 | public void IncludePartitionKeyDatePrefix() 120 | { 121 | _logger.Log(LogLevel.Trace, "this entity's partition key should be prefixed with a date"); 122 | var entity = GetLogEntities().Single(); 123 | Assert.True(entity.PartitionKey.StartsWith(DateTime.Now.ToString("yyyy-MM-dd"))); 124 | } 125 | 126 | [Fact] 127 | public void LogTimestampIsFormatted() 128 | { 129 | _logger.Log(LogLevel.Trace, "this entity's log timestamp should include .000 for milliseconds"); 130 | var entity = GetLogEntities().Single(); 131 | Assert.True(entity.LogTimeStamp.EndsWith(".000")); 132 | } 133 | 134 | [Fact] 135 | public void IncludeMachineName() 136 | { 137 | var exception = new NullReferenceException(); 138 | _logger.Log(LogLevel.Error, "execption messege", (Exception)exception); 139 | var entity = GetLogEntities().Single(); 140 | Assert.Equal(entity.MachineName, Environment.MachineName); 141 | } 142 | 143 | [Fact] 144 | public void IncludeGuidAndTimeComponentInRowKey() 145 | { 146 | var exception = new NullReferenceException(); 147 | _logger.Log(LogLevel.Error, "execption messege", (Exception)exception); 148 | var entity = GetLogEntities().Single(); 149 | const string splitter = "__"; 150 | Assert.True(entity.RowKey.Contains(splitter)); 151 | var splitterArray = "__".ToCharArray(); 152 | var segments = entity.RowKey.Split(splitterArray, StringSplitOptions.RemoveEmptyEntries); 153 | Guid globalId; 154 | long timeComponent; 155 | Assert.True(Guid.TryParse(segments[1], out globalId)); 156 | Assert.True(long.TryParse(segments[0], out timeComponent)); 157 | } 158 | 159 | 160 | 161 | private string GetStorageAccountConnectionString() 162 | { 163 | return CloudConfigurationManager.GetSetting("StorageAccountConnectionString"); 164 | } 165 | private CloudStorageAccount GetStorageAccount() 166 | { 167 | var connectionString = GetStorageAccountConnectionString(); 168 | var storageAccount = CloudStorageAccount.Parse(connectionString); 169 | return storageAccount; 170 | } 171 | private List GetLogEntities() 172 | { 173 | // Construct the query operation for all customer entities where PartitionKey="Smith". 174 | var query = new TableQuery(); 175 | // .Where(TableQuery.GenerateFilterCondition("PartitionKey", QueryComparisons.Equal, "customPrefix." + GetType())); 176 | var entities = _cloudTable.ExecuteQuery(query); 177 | return entities.ToList(); 178 | } 179 | public void Dispose() 180 | { 181 | _cloudTable.DeleteIfExists(); 182 | } 183 | } 184 | } 185 | -------------------------------------------------------------------------------- /NLog.Extensions.AzureTableStorage.Tests/Helpers.cs: -------------------------------------------------------------------------------- 1 | using System.Linq; 2 | using System.Text; 3 | 4 | namespace NLog.Extensions.AzureTableStorage.Tests 5 | { 6 | public static class Helpers 7 | { 8 | public static string ExceptBlanks(this string str) 9 | { 10 | var sb = new StringBuilder(str.Length); 11 | foreach (var c in str.Where(c => !char.IsWhiteSpace(c))) 12 | { 13 | sb.Append(c); 14 | } 15 | return sb.ToString(); 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /NLog.Extensions.AzureTableStorage.Tests/NLog.Extensions.AzureTableStorage.Tests.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | Debug 8 | AnyCPU 9 | {FFF58919-9BC6-4FFA-B0B4-2197F468813D} 10 | Library 11 | Properties 12 | NLog.Extensions.AzureTableStorage.Tests 13 | NLog.Extensions.AzureTableStorage.Tests 14 | v4.5 15 | 512 16 | ..\ 17 | true 18 | 5f660091 19 | 20 | 21 | true 22 | full 23 | false 24 | bin\Debug\ 25 | DEBUG;TRACE 26 | prompt 27 | 4 28 | 29 | 30 | pdbonly 31 | true 32 | bin\Release\ 33 | TRACE 34 | prompt 35 | 4 36 | 37 | 38 | 39 | ..\packages\Microsoft.Azure.KeyVault.Core.1.0.0\lib\net40\Microsoft.Azure.KeyVault.Core.dll 40 | True 41 | 42 | 43 | ..\packages\Microsoft.Data.Edm.5.8.2\lib\net40\Microsoft.Data.Edm.dll 44 | True 45 | 46 | 47 | ..\packages\Microsoft.Data.OData.5.8.2\lib\net40\Microsoft.Data.OData.dll 48 | True 49 | 50 | 51 | ..\packages\Microsoft.Data.Services.Client.5.8.2\lib\net40\Microsoft.Data.Services.Client.dll 52 | True 53 | 54 | 55 | ..\packages\Microsoft.WindowsAzure.ConfigurationManager.3.2.3\lib\net40\Microsoft.WindowsAzure.Configuration.dll 56 | True 57 | 58 | 59 | ..\packages\WindowsAzure.Storage.8.1.1\lib\net45\Microsoft.WindowsAzure.Storage.dll 60 | True 61 | 62 | 63 | ..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll 64 | True 65 | 66 | 67 | ..\packages\NLog.4.4.4\lib\net45\NLog.dll 68 | True 69 | 70 | 71 | 72 | 73 | 74 | ..\packages\System.Spatial.5.8.2\lib\net40\System.Spatial.dll 75 | True 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | False 84 | ..\packages\xunit.abstractions.2.0.0\lib\net35\xunit.abstractions.dll 85 | 86 | 87 | False 88 | ..\packages\xunit.assert.2.0.0\lib\portable-net45+win+wpa81+wp80+monotouch+monoandroid+Xamarin.iOS\xunit.assert.dll 89 | 90 | 91 | False 92 | ..\packages\xunit.extensibility.core.2.0.0\lib\portable-net45+win+wpa81+wp80+monotouch+monoandroid+Xamarin.iOS\xunit.core.dll 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | Always 104 | 105 | 106 | Always 107 | 108 | 109 | Designer 110 | 111 | 112 | Designer 113 | 114 | 115 | 116 | 117 | {69b79032-f3c0-4087-b14e-54e7e91fc4a0} 118 | NLog.Extensions.AzureTableStorage 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. 129 | 130 | 131 | 132 | 133 | 140 | -------------------------------------------------------------------------------- /NLog.Extensions.AzureTableStorage.Tests/NLog.config: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /NLog.Extensions.AzureTableStorage.Tests/NLog.xsd: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | Watch config file for changes and reload automatically. 16 | 17 | 18 | 19 | 20 | Print internal NLog messages to the console. Default value is: false 21 | 22 | 23 | 24 | 25 | Print internal NLog messages to the console error output. Default value is: false 26 | 27 | 28 | 29 | 30 | Write internal NLog messages to the specified file. 31 | 32 | 33 | 34 | 35 | Log level threshold for internal log messages. Default value is: Info. 36 | 37 | 38 | 39 | 40 | Global log level threshold for application log messages. Messages below this level won't be logged.. 41 | 42 | 43 | 44 | 45 | Throw an exception when there is an internal error. Default value is: false. 46 | 47 | 48 | 49 | 50 | Throw an exception when there is a configuration error. If not set, determined by throwExceptions. 51 | 52 | 53 | 54 | 55 | Gets or sets a value indicating whether Variables should be kept on configuration reload. Default value is: false. 56 | 57 | 58 | 59 | 60 | Write internal NLog messages to the System.Diagnostics.Trace. Default value is: false. 61 | 62 | 63 | 64 | 65 | Write timestamps for internal NLog messages. Default value is: true. 66 | 67 | 68 | 69 | 70 | Use InvariantCulture as default culture instead of CurrentCulture. Default value is: false. 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | Make all targets within this section asynchronous (creates additional threads but the calling thread isn't blocked by any target writes). 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | Prefix for targets/layout renderers/filters/conditions loaded from this assembly. 102 | 103 | 104 | 105 | 106 | Load NLog extensions from the specified file (*.dll) 107 | 108 | 109 | 110 | 111 | Load NLog extensions from the specified assembly. Assembly name should be fully qualified. 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | Name of the logger. May include '*' character which acts like a wildcard. Allowed forms are: *, Name, *Name, Name* and *Name* 122 | 123 | 124 | 125 | 126 | Comma separated list of levels that this rule matches. 127 | 128 | 129 | 130 | 131 | Minimum level that this rule matches. 132 | 133 | 134 | 135 | 136 | Maximum level that this rule matches. 137 | 138 | 139 | 140 | 141 | Level that this rule matches. 142 | 143 | 144 | 145 | 146 | Comma separated list of target names. 147 | 148 | 149 | 150 | 151 | Ignore further rules if this one matches. 152 | 153 | 154 | 155 | 156 | Enable or disable logging rule. Disabled rules are ignored. 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | Name of the file to be included. You could use * wildcard. The name is relative to the name of the current config file. 198 | 199 | 200 | 201 | 202 | Ignore any errors in the include file. 203 | 204 | 205 | 206 | 207 | 208 | 209 | Variable name. 210 | 211 | 212 | 213 | 214 | Variable value. 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 261 | 262 | 263 | 264 | 265 | 266 | 267 | 268 | 269 | 270 | 271 | 272 | 273 | 274 | 275 | 276 | 277 | 278 | 279 | 280 | 281 | Name of the target. 282 | 283 | 284 | 285 | 286 | Number of log events that should be processed in a batch by the lazy writer thread. 287 | 288 | 289 | 290 | 291 | Limit of full s to write before yielding into Performance is better when writing many small batches, than writing a single large batch 292 | 293 | 294 | 295 | 296 | Action to be taken when the lazy writer thread request queue count exceeds the set limit. 297 | 298 | 299 | 300 | 301 | Limit on the number of requests in the lazy writer thread request queue. 302 | 303 | 304 | 305 | 306 | Time in milliseconds to sleep between batches. 307 | 308 | 309 | 310 | 311 | Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit 312 | 313 | 314 | 315 | 316 | 317 | 318 | 319 | 320 | 321 | 322 | 323 | 324 | 325 | 326 | 327 | 328 | 329 | 330 | 331 | 332 | 333 | 334 | Name of the target. 335 | 336 | 337 | 338 | 339 | Condition expression. Log events who meet this condition will cause a flush on the wrapped target. 340 | 341 | 342 | 343 | 344 | Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit 345 | 346 | 347 | 348 | 349 | 350 | 351 | 352 | 353 | 354 | 355 | 356 | 357 | 358 | 359 | 360 | 361 | 362 | Name of the target. 363 | 364 | 365 | 366 | 367 | Number of log events to be buffered. 368 | 369 | 370 | 371 | 372 | Timeout (in milliseconds) after which the contents of buffer will be flushed if there's no write in the specified period of time. Use -1 to disable timed flushes. 373 | 374 | 375 | 376 | 377 | Indicates whether to use sliding timeout. 378 | 379 | 380 | 381 | 382 | Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit 383 | 384 | 385 | 386 | 387 | 388 | 389 | 390 | 391 | 392 | 393 | 394 | 395 | 396 | 397 | 398 | 399 | 400 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | Name of the target. 418 | 419 | 420 | 421 | 422 | Encoding to be used. 423 | 424 | 425 | 426 | 427 | Instance of that is used to format log messages. 428 | 429 | 430 | 431 | 432 | End of line value if a newline is appended at the end of log message . 433 | 434 | 435 | 436 | 437 | Maximum message size in bytes. 438 | 439 | 440 | 441 | 442 | Indicates whether to append newline at the end of log message. 443 | 444 | 445 | 446 | 447 | Action that should be taken if the will be more connections than . 448 | 449 | 450 | 451 | 452 | Action that should be taken if the message is larger than maxMessageSize. 453 | 454 | 455 | 456 | 457 | Maximum current connections. 0 = no maximum. 458 | 459 | 460 | 461 | 462 | Indicates whether to keep connection open whenever possible. 463 | 464 | 465 | 466 | 467 | Size of the connection cache (number of connections which are kept alive). 468 | 469 | 470 | 471 | 472 | Network address. 473 | 474 | 475 | 476 | 477 | Maximum queue size. 478 | 479 | 480 | 481 | 482 | Indicates whether to include dictionary contents. 483 | 484 | 485 | 486 | 487 | Indicates whether to include source info (file name and line number) in the information sent over the network. 488 | 489 | 490 | 491 | 492 | Indicates whether to include NLog-specific extensions to log4j schema. 493 | 494 | 495 | 496 | 497 | Indicates whether to include stack contents. 498 | 499 | 500 | 501 | 502 | Indicates whether to include call site (class and method name) in the information sent over the network. 503 | 504 | 505 | 506 | 507 | AppInfo field. By default it's the friendly name of the current AppDomain. 508 | 509 | 510 | 511 | 512 | NDC item separator. 513 | 514 | 515 | 516 | 517 | Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit 518 | 519 | 520 | 521 | 522 | 523 | 524 | 525 | 526 | 527 | 528 | 529 | 530 | 531 | 532 | 533 | 534 | 535 | 536 | 537 | 538 | 539 | 540 | 541 | 542 | 543 | 544 | Layout that should be use to calcuate the value for the parameter. 545 | 546 | 547 | 548 | 549 | Viewer parameter name. 550 | 551 | 552 | 553 | 554 | 555 | 556 | 557 | 558 | 559 | 560 | 561 | 562 | 563 | 564 | 565 | 566 | 567 | 568 | 569 | 570 | 571 | Name of the target. 572 | 573 | 574 | 575 | 576 | Text to be rendered. 577 | 578 | 579 | 580 | 581 | Header. 582 | 583 | 584 | 585 | 586 | Footer. 587 | 588 | 589 | 590 | 591 | Indicates whether to use default row highlighting rules. 592 | 593 | 594 | 595 | 596 | Indicates whether to auto-check if the console is available. - Disables console writing if Environment.UserInteractive = False (Windows Service) - Disables console writing if Console Standard Input is not available (Non-Console-App) 597 | 598 | 599 | 600 | 601 | The encoding for writing messages to the . 602 | 603 | 604 | 605 | 606 | Indicates whether the error stream (stderr) should be used instead of the output stream (stdout). 607 | 608 | 609 | 610 | 611 | Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit 612 | 613 | 614 | 615 | 616 | 617 | 618 | 619 | 620 | 621 | 622 | 623 | 624 | 625 | 626 | 627 | 628 | 629 | 630 | 631 | 632 | 633 | 634 | 635 | 636 | 637 | 638 | 639 | 640 | 641 | 642 | 643 | 644 | 645 | 646 | Condition that must be met in order to set the specified foreground and background color. 647 | 648 | 649 | 650 | 651 | Background color. 652 | 653 | 654 | 655 | 656 | Foreground color. 657 | 658 | 659 | 660 | 661 | 662 | 663 | 664 | 665 | 666 | 667 | 668 | 669 | 670 | 671 | 672 | Indicates whether to ignore case when comparing texts. 673 | 674 | 675 | 676 | 677 | Regular expression to be matched. You must specify either text or regex. 678 | 679 | 680 | 681 | 682 | Text to be matched. You must specify either text or regex. 683 | 684 | 685 | 686 | 687 | Indicates whether to match whole words only. 688 | 689 | 690 | 691 | 692 | Compile the ? This can improve the performance, but at the costs of more memory usage. If false, the Regex Cache is used. 693 | 694 | 695 | 696 | 697 | Background color. 698 | 699 | 700 | 701 | 702 | Foreground color. 703 | 704 | 705 | 706 | 707 | 708 | 709 | 710 | 711 | 712 | 713 | 714 | 715 | 716 | 717 | 718 | 719 | 720 | 721 | Name of the target. 722 | 723 | 724 | 725 | 726 | Text to be rendered. 727 | 728 | 729 | 730 | 731 | Header. 732 | 733 | 734 | 735 | 736 | Footer. 737 | 738 | 739 | 740 | 741 | Indicates whether to send the log messages to the standard error instead of the standard output. 742 | 743 | 744 | 745 | 746 | Indicates whether to auto-check if the console is available - Disables console writing if Environment.UserInteractive = False (Windows Service) - Disables console writing if Console Standard Input is not available (Non-Console-App) 747 | 748 | 749 | 750 | 751 | The encoding for writing messages to the . 752 | 753 | 754 | 755 | 756 | Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit 757 | 758 | 759 | 760 | 761 | 762 | 763 | 764 | 765 | 766 | 767 | 768 | 769 | 770 | 771 | 772 | 773 | 774 | 775 | 776 | 777 | 778 | 779 | 780 | 781 | 782 | 783 | 784 | 785 | 786 | Name of the target. 787 | 788 | 789 | 790 | 791 | Obsolete - value will be ignored! The logging code always runs outside of transaction. Gets or sets a value indicating whether to use database transactions. Some data providers require this. 792 | 793 | 794 | 795 | 796 | Database user name. If the ConnectionString is not provided this value will be used to construct the "User ID=" part of the connection string. 797 | 798 | 799 | 800 | 801 | Name of the database provider. 802 | 803 | 804 | 805 | 806 | Database password. If the ConnectionString is not provided this value will be used to construct the "Password=" part of the connection string. 807 | 808 | 809 | 810 | 811 | Indicates whether to keep the database connection open between the log events. 812 | 813 | 814 | 815 | 816 | Database name. If the ConnectionString is not provided this value will be used to construct the "Database=" part of the connection string. 817 | 818 | 819 | 820 | 821 | Name of the connection string (as specified in <connectionStrings> configuration section. 822 | 823 | 824 | 825 | 826 | Connection string. When provided, it overrides the values specified in DBHost, DBUserName, DBPassword, DBDatabase. 827 | 828 | 829 | 830 | 831 | Database host name. If the ConnectionString is not provided this value will be used to construct the "Server=" part of the connection string. 832 | 833 | 834 | 835 | 836 | Connection string using for installation and uninstallation. If not provided, regular ConnectionString is being used. 837 | 838 | 839 | 840 | 841 | Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit 842 | 843 | 844 | 845 | 846 | Text of the SQL command to be run on each log level. 847 | 848 | 849 | 850 | 851 | Type of the SQL command to be run on each log level. 852 | 853 | 854 | 855 | 856 | 857 | 858 | 859 | 860 | 861 | 862 | 863 | 864 | 865 | 866 | 867 | 868 | 869 | 870 | 871 | 872 | 873 | 874 | Type of the command. 875 | 876 | 877 | 878 | 879 | Connection string to run the command against. If not provided, connection string from the target is used. 880 | 881 | 882 | 883 | 884 | Indicates whether to ignore failures. 885 | 886 | 887 | 888 | 889 | Command text. 890 | 891 | 892 | 893 | 894 | 895 | 896 | 897 | 898 | 899 | 900 | 901 | 902 | 903 | Layout that should be use to calcuate the value for the parameter. 904 | 905 | 906 | 907 | 908 | Database parameter name. 909 | 910 | 911 | 912 | 913 | Database parameter precision. 914 | 915 | 916 | 917 | 918 | Database parameter scale. 919 | 920 | 921 | 922 | 923 | Database parameter size. 924 | 925 | 926 | 927 | 928 | 929 | 930 | 931 | 932 | 933 | 934 | 935 | 936 | 937 | 938 | 939 | Name of the target. 940 | 941 | 942 | 943 | 944 | Text to be rendered. 945 | 946 | 947 | 948 | 949 | Header. 950 | 951 | 952 | 953 | 954 | Footer. 955 | 956 | 957 | 958 | 959 | Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit 960 | 961 | 962 | 963 | 964 | 965 | 966 | 967 | 968 | 969 | 970 | 971 | 972 | 973 | 974 | 975 | Name of the target. 976 | 977 | 978 | 979 | 980 | Layout used to format log messages. 981 | 982 | 983 | 984 | 985 | Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit 986 | 987 | 988 | 989 | 990 | 991 | 992 | 993 | 994 | 995 | 996 | 997 | 998 | 999 | 1000 | 1001 | 1002 | 1003 | 1004 | 1005 | 1006 | 1007 | 1008 | 1009 | Name of the target. 1010 | 1011 | 1012 | 1013 | 1014 | Layout used to format log messages. 1015 | 1016 | 1017 | 1018 | 1019 | Layout that renders event Category. 1020 | 1021 | 1022 | 1023 | 1024 | Layout that renders event ID. 1025 | 1026 | 1027 | 1028 | 1029 | Name of the Event Log to write to. This can be System, Application or any user-defined name. 1030 | 1031 | 1032 | 1033 | 1034 | Name of the machine on which Event Log service is running. 1035 | 1036 | 1037 | 1038 | 1039 | Value to be used as the event Source. 1040 | 1041 | 1042 | 1043 | 1044 | Action to take if the message is larger than the option. 1045 | 1046 | 1047 | 1048 | 1049 | Optional entrytype. When not set, or when not convertable to then determined by 1050 | 1051 | 1052 | 1053 | 1054 | Message length limit to write to the Event Log. 1055 | 1056 | 1057 | 1058 | 1059 | Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit 1060 | 1061 | 1062 | 1063 | 1064 | 1065 | 1066 | 1067 | 1068 | 1069 | 1070 | 1071 | 1072 | 1073 | 1074 | 1075 | 1076 | 1077 | 1078 | 1079 | 1080 | 1081 | 1082 | Name of the target. 1083 | 1084 | 1085 | 1086 | 1087 | Indicates whether to return to the first target after any successful write. 1088 | 1089 | 1090 | 1091 | 1092 | Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit 1093 | 1094 | 1095 | 1096 | 1097 | 1098 | 1099 | 1100 | 1101 | 1102 | 1103 | 1104 | 1105 | 1106 | 1107 | 1108 | 1109 | 1110 | 1111 | 1112 | 1113 | 1114 | 1115 | 1116 | 1117 | 1118 | 1119 | 1120 | 1121 | 1122 | 1123 | 1124 | 1125 | 1126 | 1127 | 1128 | 1129 | 1130 | 1131 | 1132 | 1133 | 1134 | 1135 | 1136 | 1137 | 1138 | 1139 | 1140 | 1141 | 1142 | 1143 | Name of the target. 1144 | 1145 | 1146 | 1147 | 1148 | Text to be rendered. 1149 | 1150 | 1151 | 1152 | 1153 | Header. 1154 | 1155 | 1156 | 1157 | 1158 | Footer. 1159 | 1160 | 1161 | 1162 | 1163 | File encoding. 1164 | 1165 | 1166 | 1167 | 1168 | Line ending mode. 1169 | 1170 | 1171 | 1172 | 1173 | Way file archives are numbered. 1174 | 1175 | 1176 | 1177 | 1178 | Name of the file to be used for an archive. 1179 | 1180 | 1181 | 1182 | 1183 | Indicates whether to automatically archive log files every time the specified time passes. 1184 | 1185 | 1186 | 1187 | 1188 | Size in bytes above which log files will be automatically archived. Warning: combining this with isn't supported. We cannot create multiple archive files, if they should have the same name. Choose: 1189 | 1190 | 1191 | 1192 | 1193 | Indicates whether to compress archive files into the zip archive format. 1194 | 1195 | 1196 | 1197 | 1198 | Maximum number of archive files that should be kept. 1199 | 1200 | 1201 | 1202 | 1203 | Gets or set a value indicating whether a managed file stream is forced, instead of using the native implementation. 1204 | 1205 | 1206 | 1207 | 1208 | Is the an absolute or relative path? 1209 | 1210 | 1211 | 1212 | 1213 | Cleanup invalid values in a filename, e.g. slashes in a filename. If set to true, this can impact the performance of massive writes. If set to false, nothing gets written when the filename is wrong. 1214 | 1215 | 1216 | 1217 | 1218 | Whether or not this target should just discard all data that its asked to write. Mostly used for when testing NLog Stack except final write 1219 | 1220 | 1221 | 1222 | 1223 | Is the an absolute or relative path? 1224 | 1225 | 1226 | 1227 | 1228 | Value indicationg whether file creation calls should be synchronized by a system global mutex. 1229 | 1230 | 1231 | 1232 | 1233 | Indicates whether the footer should be written only when the file is archived. 1234 | 1235 | 1236 | 1237 | 1238 | Name of the file to write to. 1239 | 1240 | 1241 | 1242 | 1243 | Value specifying the date format to use when archiving files. 1244 | 1245 | 1246 | 1247 | 1248 | Indicates whether to archive old log file on startup. 1249 | 1250 | 1251 | 1252 | 1253 | Indicates whether to create directories if they do not exist. 1254 | 1255 | 1256 | 1257 | 1258 | Indicates whether to enable log file(s) to be deleted. 1259 | 1260 | 1261 | 1262 | 1263 | File attributes (Windows only). 1264 | 1265 | 1266 | 1267 | 1268 | Indicates whether to delete old log file on startup. 1269 | 1270 | 1271 | 1272 | 1273 | Indicates whether to replace file contents on each write instead of appending log message at the end. 1274 | 1275 | 1276 | 1277 | 1278 | Indicates whether concurrent writes to the log file by multiple processes on the same host. 1279 | 1280 | 1281 | 1282 | 1283 | Indicates whether to keep log file open instead of opening and closing it on each logging event. 1284 | 1285 | 1286 | 1287 | 1288 | Maximum number of log filenames that should be stored as existing. 1289 | 1290 | 1291 | 1292 | 1293 | Indicates whether concurrent writes to the log file by multiple processes on different network hosts. 1294 | 1295 | 1296 | 1297 | 1298 | Number of files to be kept open. Setting this to a higher value may improve performance in a situation where a single File target is writing to many files (such as splitting by level or by logger). 1299 | 1300 | 1301 | 1302 | 1303 | Maximum number of seconds that files are kept open. If this number is negative the files are not automatically closed after a period of inactivity. 1304 | 1305 | 1306 | 1307 | 1308 | Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit 1309 | 1310 | 1311 | 1312 | 1313 | Log file buffer size in bytes. 1314 | 1315 | 1316 | 1317 | 1318 | Indicates whether to automatically flush the file buffers after each log message. 1319 | 1320 | 1321 | 1322 | 1323 | Delay in milliseconds to wait before attempting to write to the file again. 1324 | 1325 | 1326 | 1327 | 1328 | Number of times the write is appended on the file before NLog discards the log message. 1329 | 1330 | 1331 | 1332 | 1333 | 1334 | 1335 | 1336 | 1337 | 1338 | 1339 | 1340 | 1341 | 1342 | 1343 | 1344 | 1345 | 1346 | 1347 | 1348 | 1349 | 1350 | 1351 | 1352 | 1353 | 1354 | 1355 | 1356 | 1357 | 1358 | 1359 | 1360 | 1361 | 1362 | 1363 | 1364 | 1365 | 1366 | 1367 | 1368 | 1369 | 1370 | 1371 | 1372 | 1373 | 1374 | 1375 | 1376 | 1377 | 1378 | 1379 | 1380 | 1381 | 1382 | 1383 | 1384 | 1385 | 1386 | 1387 | 1388 | 1389 | 1390 | 1391 | 1392 | 1393 | 1394 | 1395 | 1396 | Name of the target. 1397 | 1398 | 1399 | 1400 | 1401 | Condition expression. Log events who meet this condition will be forwarded to the wrapped target. 1402 | 1403 | 1404 | 1405 | 1406 | Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit 1407 | 1408 | 1409 | 1410 | 1411 | 1412 | 1413 | 1414 | 1415 | 1416 | 1417 | 1418 | 1419 | 1420 | 1421 | 1422 | 1423 | 1424 | 1425 | 1426 | 1427 | 1428 | Name of the target. 1429 | 1430 | 1431 | 1432 | 1433 | Windows domain name to change context to. 1434 | 1435 | 1436 | 1437 | 1438 | Required impersonation level. 1439 | 1440 | 1441 | 1442 | 1443 | Type of the logon provider. 1444 | 1445 | 1446 | 1447 | 1448 | Logon Type. 1449 | 1450 | 1451 | 1452 | 1453 | User account password. 1454 | 1455 | 1456 | 1457 | 1458 | Indicates whether to revert to the credentials of the process instead of impersonating another user. 1459 | 1460 | 1461 | 1462 | 1463 | Username to change context to. 1464 | 1465 | 1466 | 1467 | 1468 | Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit 1469 | 1470 | 1471 | 1472 | 1473 | 1474 | 1475 | 1476 | 1477 | 1478 | 1479 | 1480 | 1481 | 1482 | 1483 | 1484 | 1485 | 1486 | 1487 | 1488 | 1489 | 1490 | 1491 | 1492 | 1493 | 1494 | 1495 | 1496 | 1497 | 1498 | 1499 | 1500 | 1501 | 1502 | 1503 | 1504 | 1505 | 1506 | 1507 | 1508 | Name of the target. 1509 | 1510 | 1511 | 1512 | 1513 | Interval in which messages will be written up to the number of messages. 1514 | 1515 | 1516 | 1517 | 1518 | Maximum allowed number of messages written per . 1519 | 1520 | 1521 | 1522 | 1523 | Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit 1524 | 1525 | 1526 | 1527 | 1528 | 1529 | 1530 | 1531 | 1532 | 1533 | 1534 | 1535 | 1536 | 1537 | 1538 | 1539 | 1540 | 1541 | 1542 | 1543 | 1544 | 1545 | Name of the target. 1546 | 1547 | 1548 | 1549 | 1550 | Endpoint address. 1551 | 1552 | 1553 | 1554 | 1555 | Name of the endpoint configuration in WCF configuration file. 1556 | 1557 | 1558 | 1559 | 1560 | Indicates whether to use a WCF service contract that is one way (fire and forget) or two way (request-reply) 1561 | 1562 | 1563 | 1564 | 1565 | Client ID. 1566 | 1567 | 1568 | 1569 | 1570 | Indicates whether to include per-event properties in the payload sent to the server. 1571 | 1572 | 1573 | 1574 | 1575 | Indicates whether to use binary message encoding. 1576 | 1577 | 1578 | 1579 | 1580 | Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit 1581 | 1582 | 1583 | 1584 | 1585 | 1586 | 1587 | 1588 | 1589 | 1590 | 1591 | 1592 | 1593 | 1594 | Layout that should be use to calculate the value for the parameter. 1595 | 1596 | 1597 | 1598 | 1599 | Name of the parameter. 1600 | 1601 | 1602 | 1603 | 1604 | Type of the parameter. 1605 | 1606 | 1607 | 1608 | 1609 | 1610 | 1611 | 1612 | 1613 | 1614 | 1615 | 1616 | 1617 | 1618 | 1619 | 1620 | 1621 | 1622 | 1623 | 1624 | 1625 | 1626 | 1627 | 1628 | 1629 | 1630 | 1631 | 1632 | 1633 | 1634 | 1635 | 1636 | 1637 | 1638 | 1639 | 1640 | 1641 | Name of the target. 1642 | 1643 | 1644 | 1645 | 1646 | Text to be rendered. 1647 | 1648 | 1649 | 1650 | 1651 | Header. 1652 | 1653 | 1654 | 1655 | 1656 | Footer. 1657 | 1658 | 1659 | 1660 | 1661 | Indicates whether to send message as HTML instead of plain text. 1662 | 1663 | 1664 | 1665 | 1666 | Encoding to be used for sending e-mail. 1667 | 1668 | 1669 | 1670 | 1671 | Indicates whether to add new lines between log entries. 1672 | 1673 | 1674 | 1675 | 1676 | CC email addresses separated by semicolons (e.g. john@domain.com;jane@domain.com). 1677 | 1678 | 1679 | 1680 | 1681 | Recipients' email addresses separated by semicolons (e.g. john@domain.com;jane@domain.com). 1682 | 1683 | 1684 | 1685 | 1686 | BCC email addresses separated by semicolons (e.g. john@domain.com;jane@domain.com). 1687 | 1688 | 1689 | 1690 | 1691 | Mail message body (repeated for each log message send in one mail). 1692 | 1693 | 1694 | 1695 | 1696 | Mail subject. 1697 | 1698 | 1699 | 1700 | 1701 | Sender's email address (e.g. joe@domain.com). 1702 | 1703 | 1704 | 1705 | 1706 | Indicates the SMTP client timeout. 1707 | 1708 | 1709 | 1710 | 1711 | Priority used for sending mails. 1712 | 1713 | 1714 | 1715 | 1716 | Indicates whether NewLine characters in the body should be replaced with tags. 1717 | 1718 | 1719 | 1720 | 1721 | Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit 1722 | 1723 | 1724 | 1725 | 1726 | SMTP Server to be used for sending. 1727 | 1728 | 1729 | 1730 | 1731 | SMTP Authentication mode. 1732 | 1733 | 1734 | 1735 | 1736 | Username used to connect to SMTP server (used when SmtpAuthentication is set to "basic"). 1737 | 1738 | 1739 | 1740 | 1741 | Password used to authenticate against SMTP server (used when SmtpAuthentication is set to "basic"). 1742 | 1743 | 1744 | 1745 | 1746 | Indicates whether SSL (secure sockets layer) should be used when communicating with SMTP server. 1747 | 1748 | 1749 | 1750 | 1751 | Port number that SMTP Server is listening on. 1752 | 1753 | 1754 | 1755 | 1756 | Indicates whether the default Settings from System.Net.MailSettings should be used. 1757 | 1758 | 1759 | 1760 | 1761 | Folder where applications save mail messages to be processed by the local SMTP server. 1762 | 1763 | 1764 | 1765 | 1766 | Specifies how outgoing email messages will be handled. 1767 | 1768 | 1769 | 1770 | 1771 | 1772 | 1773 | 1774 | 1775 | 1776 | 1777 | 1778 | 1779 | 1780 | 1781 | 1782 | 1783 | 1784 | 1785 | 1786 | 1787 | 1788 | 1789 | 1790 | 1791 | 1792 | 1793 | 1794 | 1795 | 1796 | Name of the target. 1797 | 1798 | 1799 | 1800 | 1801 | Layout used to format log messages. 1802 | 1803 | 1804 | 1805 | 1806 | Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit 1807 | 1808 | 1809 | 1810 | 1811 | 1812 | 1813 | 1814 | 1815 | 1816 | 1817 | 1818 | 1819 | 1820 | 1821 | 1822 | 1823 | 1824 | 1825 | 1826 | 1827 | 1828 | 1829 | Name of the target. 1830 | 1831 | 1832 | 1833 | 1834 | Layout used to format log messages. 1835 | 1836 | 1837 | 1838 | 1839 | Encoding to be used when writing text to the queue. 1840 | 1841 | 1842 | 1843 | 1844 | Indicates whether to use the XML format when serializing message. This will also disable creating queues. 1845 | 1846 | 1847 | 1848 | 1849 | Indicates whether to check if a queue exists before writing to it. 1850 | 1851 | 1852 | 1853 | 1854 | Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit 1855 | 1856 | 1857 | 1858 | 1859 | Indicates whether to create the queue if it doesn't exists. 1860 | 1861 | 1862 | 1863 | 1864 | Label to associate with each message. 1865 | 1866 | 1867 | 1868 | 1869 | Name of the queue to write to. 1870 | 1871 | 1872 | 1873 | 1874 | Indicates whether to use recoverable messages (with guaranteed delivery). 1875 | 1876 | 1877 | 1878 | 1879 | 1880 | 1881 | 1882 | 1883 | 1884 | 1885 | 1886 | 1887 | 1888 | 1889 | 1890 | 1891 | 1892 | Name of the target. 1893 | 1894 | 1895 | 1896 | 1897 | Class name. 1898 | 1899 | 1900 | 1901 | 1902 | Method name. The method must be public and static. Use the AssemblyQualifiedName , https://msdn.microsoft.com/en-us/library/system.type.assemblyqualifiedname(v=vs.110).aspx e.g. 1903 | 1904 | 1905 | 1906 | 1907 | Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit 1908 | 1909 | 1910 | 1911 | 1912 | 1913 | 1914 | 1915 | 1916 | 1917 | 1918 | 1919 | 1920 | 1921 | 1922 | 1923 | 1924 | 1925 | 1926 | 1927 | 1928 | 1929 | 1930 | 1931 | 1932 | 1933 | 1934 | Name of the target. 1935 | 1936 | 1937 | 1938 | 1939 | Layout used to format log messages. 1940 | 1941 | 1942 | 1943 | 1944 | Encoding to be used. 1945 | 1946 | 1947 | 1948 | 1949 | End of line value if a newline is appended at the end of log message . 1950 | 1951 | 1952 | 1953 | 1954 | Maximum message size in bytes. 1955 | 1956 | 1957 | 1958 | 1959 | Indicates whether to append newline at the end of log message. 1960 | 1961 | 1962 | 1963 | 1964 | Action that should be taken if the will be more connections than . 1965 | 1966 | 1967 | 1968 | 1969 | Action that should be taken if the message is larger than maxMessageSize. 1970 | 1971 | 1972 | 1973 | 1974 | Network address. 1975 | 1976 | 1977 | 1978 | 1979 | Size of the connection cache (number of connections which are kept alive). 1980 | 1981 | 1982 | 1983 | 1984 | Indicates whether to keep connection open whenever possible. 1985 | 1986 | 1987 | 1988 | 1989 | Maximum current connections. 0 = no maximum. 1990 | 1991 | 1992 | 1993 | 1994 | Maximum queue size. 1995 | 1996 | 1997 | 1998 | 1999 | Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit 2000 | 2001 | 2002 | 2003 | 2004 | 2005 | 2006 | 2007 | 2008 | 2009 | 2010 | 2011 | 2012 | 2013 | 2014 | 2015 | 2016 | 2017 | 2018 | 2019 | 2020 | 2021 | 2022 | 2023 | 2024 | 2025 | 2026 | 2027 | 2028 | 2029 | 2030 | 2031 | 2032 | 2033 | 2034 | Name of the target. 2035 | 2036 | 2037 | 2038 | 2039 | Encoding to be used. 2040 | 2041 | 2042 | 2043 | 2044 | Instance of that is used to format log messages. 2045 | 2046 | 2047 | 2048 | 2049 | End of line value if a newline is appended at the end of log message . 2050 | 2051 | 2052 | 2053 | 2054 | Maximum message size in bytes. 2055 | 2056 | 2057 | 2058 | 2059 | Indicates whether to append newline at the end of log message. 2060 | 2061 | 2062 | 2063 | 2064 | Action that should be taken if the will be more connections than . 2065 | 2066 | 2067 | 2068 | 2069 | Action that should be taken if the message is larger than maxMessageSize. 2070 | 2071 | 2072 | 2073 | 2074 | Maximum current connections. 0 = no maximum. 2075 | 2076 | 2077 | 2078 | 2079 | Indicates whether to keep connection open whenever possible. 2080 | 2081 | 2082 | 2083 | 2084 | Size of the connection cache (number of connections which are kept alive). 2085 | 2086 | 2087 | 2088 | 2089 | Network address. 2090 | 2091 | 2092 | 2093 | 2094 | Maximum queue size. 2095 | 2096 | 2097 | 2098 | 2099 | Indicates whether to include dictionary contents. 2100 | 2101 | 2102 | 2103 | 2104 | Indicates whether to include source info (file name and line number) in the information sent over the network. 2105 | 2106 | 2107 | 2108 | 2109 | Indicates whether to include NLog-specific extensions to log4j schema. 2110 | 2111 | 2112 | 2113 | 2114 | Indicates whether to include stack contents. 2115 | 2116 | 2117 | 2118 | 2119 | Indicates whether to include call site (class and method name) in the information sent over the network. 2120 | 2121 | 2122 | 2123 | 2124 | AppInfo field. By default it's the friendly name of the current AppDomain. 2125 | 2126 | 2127 | 2128 | 2129 | NDC item separator. 2130 | 2131 | 2132 | 2133 | 2134 | Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit 2135 | 2136 | 2137 | 2138 | 2139 | 2140 | 2141 | 2142 | 2143 | 2144 | 2145 | 2146 | 2147 | 2148 | 2149 | 2150 | 2151 | Name of the target. 2152 | 2153 | 2154 | 2155 | 2156 | Layout used to format log messages. 2157 | 2158 | 2159 | 2160 | 2161 | Indicates whether to perform layout calculation. 2162 | 2163 | 2164 | 2165 | 2166 | Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit 2167 | 2168 | 2169 | 2170 | 2171 | 2172 | 2173 | 2174 | 2175 | 2176 | 2177 | 2178 | 2179 | 2180 | 2181 | 2182 | Name of the target. 2183 | 2184 | 2185 | 2186 | 2187 | Layout used to format log messages. 2188 | 2189 | 2190 | 2191 | 2192 | Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit 2193 | 2194 | 2195 | 2196 | 2197 | 2198 | 2199 | 2200 | 2201 | 2202 | 2203 | 2204 | 2205 | 2206 | 2207 | 2208 | 2209 | 2210 | 2211 | 2212 | 2213 | 2214 | Name of the target. 2215 | 2216 | 2217 | 2218 | 2219 | Indicates whether performance counter should be automatically created. 2220 | 2221 | 2222 | 2223 | 2224 | Name of the performance counter category. 2225 | 2226 | 2227 | 2228 | 2229 | Counter help text. 2230 | 2231 | 2232 | 2233 | 2234 | Name of the performance counter. 2235 | 2236 | 2237 | 2238 | 2239 | Performance counter type. 2240 | 2241 | 2242 | 2243 | 2244 | The value by which to increment the counter. 2245 | 2246 | 2247 | 2248 | 2249 | Performance counter instance name. 2250 | 2251 | 2252 | 2253 | 2254 | Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit 2255 | 2256 | 2257 | 2258 | 2259 | 2260 | 2261 | 2262 | 2263 | 2264 | 2265 | 2266 | 2267 | 2268 | 2269 | 2270 | 2271 | 2272 | 2273 | 2274 | 2275 | 2276 | 2277 | 2278 | 2279 | 2280 | 2281 | 2282 | 2283 | 2284 | 2285 | 2286 | 2287 | 2288 | 2289 | 2290 | 2291 | 2292 | 2293 | 2294 | 2295 | 2296 | 2297 | 2298 | 2299 | 2300 | 2301 | 2302 | 2303 | Name of the target. 2304 | 2305 | 2306 | 2307 | 2308 | Default filter to be applied when no specific rule matches. 2309 | 2310 | 2311 | 2312 | 2313 | Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit 2314 | 2315 | 2316 | 2317 | 2318 | 2319 | 2320 | 2321 | 2322 | 2323 | 2324 | 2325 | 2326 | Condition to be tested. 2327 | 2328 | 2329 | 2330 | 2331 | Resulting filter to be applied when the condition matches. 2332 | 2333 | 2334 | 2335 | 2336 | 2337 | 2338 | 2339 | 2340 | 2341 | 2342 | 2343 | 2344 | Name of the target. 2345 | 2346 | 2347 | 2348 | 2349 | Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit 2350 | 2351 | 2352 | 2353 | 2354 | 2355 | 2356 | 2357 | 2358 | 2359 | 2360 | 2361 | 2362 | 2363 | 2364 | 2365 | Name of the target. 2366 | 2367 | 2368 | 2369 | 2370 | Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit 2371 | 2372 | 2373 | 2374 | 2375 | Number of times to repeat each log message. 2376 | 2377 | 2378 | 2379 | 2380 | 2381 | 2382 | 2383 | 2384 | 2385 | 2386 | 2387 | 2388 | 2389 | 2390 | 2391 | 2392 | Name of the target. 2393 | 2394 | 2395 | 2396 | 2397 | Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit 2398 | 2399 | 2400 | 2401 | 2402 | Number of retries that should be attempted on the wrapped target in case of a failure. 2403 | 2404 | 2405 | 2406 | 2407 | Time to wait between retries in milliseconds. 2408 | 2409 | 2410 | 2411 | 2412 | 2413 | 2414 | 2415 | 2416 | 2417 | 2418 | 2419 | 2420 | 2421 | 2422 | Name of the target. 2423 | 2424 | 2425 | 2426 | 2427 | Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit 2428 | 2429 | 2430 | 2431 | 2432 | 2433 | 2434 | 2435 | 2436 | 2437 | 2438 | 2439 | 2440 | 2441 | 2442 | Name of the target. 2443 | 2444 | 2445 | 2446 | 2447 | Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit 2448 | 2449 | 2450 | 2451 | 2452 | 2453 | 2454 | 2455 | 2456 | 2457 | 2458 | 2459 | 2460 | 2461 | 2462 | 2463 | Name of the target. 2464 | 2465 | 2466 | 2467 | 2468 | Layout used to format log messages. 2469 | 2470 | 2471 | 2472 | 2473 | Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit 2474 | 2475 | 2476 | 2477 | 2478 | 2479 | 2480 | 2481 | 2482 | 2483 | 2484 | 2485 | 2486 | 2487 | 2488 | 2489 | 2490 | 2491 | 2492 | 2493 | 2494 | 2495 | 2496 | 2497 | 2498 | 2499 | Name of the target. 2500 | 2501 | 2502 | 2503 | 2504 | Should we include the BOM (Byte-order-mark) for UTF? Influences the property. This will only work for UTF-8. 2505 | 2506 | 2507 | 2508 | 2509 | Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit 2510 | 2511 | 2512 | 2513 | 2514 | Encoding. 2515 | 2516 | 2517 | 2518 | 2519 | Value whether escaping be done according to the old NLog style (Very non-standard) 2520 | 2521 | 2522 | 2523 | 2524 | Value whether escaping be done according to Rfc3986 (Supports Internationalized Resource Identifiers - IRIs) 2525 | 2526 | 2527 | 2528 | 2529 | Web service method name. Only used with Soap. 2530 | 2531 | 2532 | 2533 | 2534 | Web service namespace. Only used with Soap. 2535 | 2536 | 2537 | 2538 | 2539 | Protocol to be used when calling web service. 2540 | 2541 | 2542 | 2543 | 2544 | Web service URL. 2545 | 2546 | 2547 | 2548 | 2549 | Name of the root XML element, if POST of XML document chosen. If so, this property must not be null. (see and ). 2550 | 2551 | 2552 | 2553 | 2554 | (optional) root namespace of the XML document, if POST of XML document chosen. (see and ). 2555 | 2556 | 2557 | 2558 | 2559 | 2560 | 2561 | 2562 | 2563 | 2564 | 2565 | 2566 | 2567 | 2568 | 2569 | 2570 | 2571 | 2572 | 2573 | 2574 | 2575 | 2576 | 2577 | 2578 | 2579 | 2580 | 2581 | 2582 | 2583 | 2584 | 2585 | 2586 | 2587 | 2588 | 2589 | 2590 | 2591 | 2592 | 2593 | 2594 | 2595 | 2596 | 2597 | 2598 | Footer layout. 2599 | 2600 | 2601 | 2602 | 2603 | Header layout. 2604 | 2605 | 2606 | 2607 | 2608 | Body layout (can be repeated multiple times). 2609 | 2610 | 2611 | 2612 | 2613 | Custom column delimiter value (valid when ColumnDelimiter is set to 'Custom'). 2614 | 2615 | 2616 | 2617 | 2618 | Column delimiter. 2619 | 2620 | 2621 | 2622 | 2623 | Quote Character. 2624 | 2625 | 2626 | 2627 | 2628 | Quoting mode. 2629 | 2630 | 2631 | 2632 | 2633 | Indicates whether CVS should include header. 2634 | 2635 | 2636 | 2637 | 2638 | 2639 | 2640 | 2641 | 2642 | 2643 | 2644 | 2645 | 2646 | 2647 | 2648 | 2649 | 2650 | 2651 | 2652 | 2653 | 2654 | 2655 | 2656 | 2657 | 2658 | 2659 | 2660 | 2661 | 2662 | 2663 | 2664 | Layout of the column. 2665 | 2666 | 2667 | 2668 | 2669 | Name of the column. 2670 | 2671 | 2672 | 2673 | 2674 | 2675 | 2676 | 2677 | 2678 | 2679 | 2680 | 2681 | 2682 | 2683 | 2684 | 2685 | List of property names to exclude when is true 2686 | 2687 | 2688 | 2689 | 2690 | Option to include all properties from the log events 2691 | 2692 | 2693 | 2694 | 2695 | Option to render the empty object value {} 2696 | 2697 | 2698 | 2699 | 2700 | Option to suppress the extra spaces in the output json 2701 | 2702 | 2703 | 2704 | 2705 | 2706 | 2707 | 2708 | 2709 | 2710 | 2711 | 2712 | 2713 | 2714 | Determines wether or not this attribute will be Json encoded. 2715 | 2716 | 2717 | 2718 | 2719 | Layout that will be rendered as the attribute's value. 2720 | 2721 | 2722 | 2723 | 2724 | Name of the attribute. 2725 | 2726 | 2727 | 2728 | 2729 | 2730 | 2731 | 2732 | 2733 | 2734 | 2735 | 2736 | 2737 | 2738 | Footer layout. 2739 | 2740 | 2741 | 2742 | 2743 | Header layout. 2744 | 2745 | 2746 | 2747 | 2748 | Body layout (can be repeated multiple times). 2749 | 2750 | 2751 | 2752 | 2753 | 2754 | 2755 | 2756 | 2757 | 2758 | 2759 | 2760 | 2761 | 2762 | 2763 | 2764 | 2765 | 2766 | 2767 | 2768 | 2769 | Layout text. 2770 | 2771 | 2772 | 2773 | 2774 | 2775 | 2776 | 2777 | 2778 | 2779 | 2780 | 2781 | 2782 | 2783 | 2784 | Action to be taken when filter matches. 2785 | 2786 | 2787 | 2788 | 2789 | Condition expression. 2790 | 2791 | 2792 | 2793 | 2794 | 2795 | 2796 | 2797 | 2798 | 2799 | 2800 | 2801 | 2802 | 2803 | 2804 | 2805 | 2806 | 2807 | 2808 | 2809 | 2810 | 2811 | 2812 | 2813 | 2814 | 2815 | Action to be taken when filter matches. 2816 | 2817 | 2818 | 2819 | 2820 | Indicates whether to ignore case when comparing strings. 2821 | 2822 | 2823 | 2824 | 2825 | Layout to be used to filter log messages. 2826 | 2827 | 2828 | 2829 | 2830 | Substring to be matched. 2831 | 2832 | 2833 | 2834 | 2835 | 2836 | 2837 | 2838 | 2839 | 2840 | 2841 | 2842 | 2843 | 2844 | 2845 | 2846 | 2847 | Action to be taken when filter matches. 2848 | 2849 | 2850 | 2851 | 2852 | String to compare the layout to. 2853 | 2854 | 2855 | 2856 | 2857 | Indicates whether to ignore case when comparing strings. 2858 | 2859 | 2860 | 2861 | 2862 | Layout to be used to filter log messages. 2863 | 2864 | 2865 | 2866 | 2867 | 2868 | 2869 | 2870 | 2871 | 2872 | 2873 | 2874 | 2875 | 2876 | 2877 | 2878 | 2879 | Action to be taken when filter matches. 2880 | 2881 | 2882 | 2883 | 2884 | Indicates whether to ignore case when comparing strings. 2885 | 2886 | 2887 | 2888 | 2889 | Layout to be used to filter log messages. 2890 | 2891 | 2892 | 2893 | 2894 | Substring to be matched. 2895 | 2896 | 2897 | 2898 | 2899 | 2900 | 2901 | 2902 | 2903 | 2904 | 2905 | 2906 | 2907 | 2908 | 2909 | 2910 | 2911 | Action to be taken when filter matches. 2912 | 2913 | 2914 | 2915 | 2916 | String to compare the layout to. 2917 | 2918 | 2919 | 2920 | 2921 | Indicates whether to ignore case when comparing strings. 2922 | 2923 | 2924 | 2925 | 2926 | Layout to be used to filter log messages. 2927 | 2928 | 2929 | 2930 | 2931 | 2932 | 2933 | 2934 | 2935 | 2936 | 2937 | 2938 | 2939 | 2940 | 2941 | 2942 | 2943 | 2944 | 2945 | 2946 | 2947 | 2948 | 2949 | 2950 | 2951 | 2952 | 2953 | 2954 | 2955 | 2956 | 2957 | 2958 | 2959 | 2960 | -------------------------------------------------------------------------------- /NLog.Extensions.AzureTableStorage.Tests/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 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("NLog.Extensions.AzureTableStorage.Tests")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("NLog.Extensions.AzureTableStorage.Tests")] 13 | [assembly: AssemblyCopyright("Copyright © 2014")] 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("c47d17c1-d464-4ede-bc9d-d81b19c29176")] 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 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /NLog.Extensions.AzureTableStorage.Tests/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /NLog.Extensions.AzureTableStorage/AzureStorageTableNameValidator.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text.RegularExpressions; 4 | 5 | namespace NLog.Extensions.AzureTableStorage 6 | { 7 | //validation rules described in: http://msdn.microsoft.com/en-us/library/windowsazure/dd179338.aspx 8 | public class AzureStorageTableNameValidator 9 | { 10 | private readonly string _tableName; 11 | private const string RegularExpression = @"^[A-Za-z][A-Za-z0-9]{2,62}$"; 12 | private readonly List _reservedWords; 13 | 14 | public AzureStorageTableNameValidator(string tableName) 15 | { 16 | if (string.IsNullOrEmpty(tableName)) 17 | { 18 | throw new NullReferenceException(tableName); 19 | } 20 | _tableName = tableName; 21 | _reservedWords = new List { "tables" }; 22 | } 23 | 24 | public bool IsValid() 25 | { 26 | return !_reservedWords.Contains(_tableName) 27 | && Regex.IsMatch(_tableName, RegularExpression); 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /NLog.Extensions.AzureTableStorage/AzureTableStorageTarget.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.ComponentModel.DataAnnotations; 3 | using NLog.Targets; 4 | 5 | namespace NLog.Extensions.AzureTableStorage 6 | { 7 | [Target("AzureTableStorage")] 8 | public class AzureTableStorageTarget : TargetWithLayout 9 | { 10 | private ConfigManager _configManager; 11 | private TableStorageManager _tableStorageManager; 12 | 13 | [Required] 14 | public string ConnectionStringKey { get; set; } 15 | 16 | [Required] 17 | public string TableName { get; set; } 18 | 19 | public string PartitionKeyPrefix { get; set; } 20 | public string PartitionKeyPrefixKey { get; set; } 21 | public string PartitionKeyPrefixDateFormat { get; set; } 22 | 23 | public string LogTimestampFormatString { get; set; } 24 | 25 | protected override void InitializeTarget() 26 | { 27 | base.InitializeTarget(); 28 | ValidateParameters(); 29 | _configManager = new ConfigManager(ConnectionStringKey); 30 | _tableStorageManager = new TableStorageManager(_configManager, TableName); 31 | 32 | // use PartitionKeyPrefixKey if present 33 | if (!string.IsNullOrWhiteSpace(PartitionKeyPrefixKey)) 34 | { 35 | PartitionKeyPrefix = _configManager.GetSettingByKey(PartitionKeyPrefixKey); 36 | } 37 | // else use PartitionKeyPrefixDateFormat if available 38 | else if (!string.IsNullOrWhiteSpace(PartitionKeyPrefixDateFormat)) 39 | { 40 | PartitionKeyPrefix = DateTime.UtcNow.ToString(PartitionKeyPrefixDateFormat); 41 | } 42 | } 43 | 44 | private void ValidateParameters() 45 | { 46 | IsNameValidForTableStorage(TableName); 47 | } 48 | 49 | private void IsNameValidForTableStorage(string tableName) 50 | { 51 | var validator = new AzureStorageTableNameValidator(tableName); 52 | if (!validator.IsValid()) 53 | { 54 | throw new NotSupportedException(tableName + " is not a valid name for Azure storage table name.") 55 | { 56 | HelpLink = "http://msdn.microsoft.com/en-us/library/windowsazure/dd179338.aspx" 57 | }; 58 | } 59 | } 60 | 61 | protected override void Write(LogEventInfo logEvent) 62 | { 63 | if (_tableStorageManager != null) 64 | { 65 | var layoutMessage = Layout.Render(logEvent); 66 | 67 | if (string.IsNullOrEmpty(LogTimestampFormatString)) 68 | { 69 | _tableStorageManager.Add(new LogEntity(PartitionKeyPrefix, logEvent, layoutMessage)); 70 | } 71 | else 72 | { 73 | _tableStorageManager.Add(new LogEntity(PartitionKeyPrefix, logEvent, layoutMessage, LogTimestampFormatString)); 74 | } 75 | } 76 | } 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /NLog.Extensions.AzureTableStorage/ConfigManager.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Azure; 2 | using Microsoft.WindowsAzure.Storage; 3 | using System.Configuration; 4 | 5 | namespace NLog.Extensions.AzureTableStorage 6 | { 7 | public class ConfigManager 8 | { 9 | private readonly string _connectionStringKey; 10 | 11 | public ConfigManager(string connectionStringKey) 12 | { 13 | _connectionStringKey = connectionStringKey; 14 | } 15 | 16 | private string GetStorageAccountConnectionString() 17 | { 18 | //try get connection string from app settings or cloud service config 19 | var connectionStringValue = CloudConfigurationManager.GetSetting(_connectionStringKey); 20 | if (!string.IsNullOrEmpty(connectionStringValue)) return connectionStringValue; 21 | 22 | //try get connection string from ConfigurationManager.ConnectionStrings 23 | var connectionString = ConfigurationManager.ConnectionStrings[_connectionStringKey]; 24 | if (connectionString != null) 25 | { 26 | connectionStringValue = connectionString.ConnectionString; 27 | } 28 | return connectionStringValue; 29 | } 30 | 31 | public CloudStorageAccount GetStorageAccount() 32 | { 33 | var connectionString = GetStorageAccountConnectionString(); 34 | return CloudStorageAccount.Parse(connectionString); 35 | } 36 | 37 | public string GetSettingByKey(string key) 38 | { 39 | //try get string from app settings or cloud service config 40 | return CloudConfigurationManager.GetSetting(key); 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /NLog.Extensions.AzureTableStorage/LogEntity.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Text; 4 | using Microsoft.WindowsAzure.Storage.Table; 5 | 6 | namespace NLog.Extensions.AzureTableStorage 7 | { 8 | public class LogEntity : TableEntity 9 | { 10 | private readonly object _syncRoot = new object(); 11 | 12 | public LogEntity(string partitionKeyPrefix, LogEventInfo logEvent, string layoutMessage, string timestampFormatString = "g") 13 | { 14 | lock (_syncRoot) 15 | { 16 | LoggerName = logEvent.LoggerName; 17 | LogTimeStamp = logEvent.TimeStamp.ToString(timestampFormatString); 18 | Level = logEvent.Level.Name; 19 | Message = logEvent.FormattedMessage; 20 | MessageWithLayout = layoutMessage; 21 | if (logEvent.Exception != null) 22 | { 23 | Exception = logEvent.Exception.ToString(); 24 | if (logEvent.Exception.Data.Count > 0) 25 | { 26 | ExceptionData = GetExceptionDataAsString(logEvent.Exception); 27 | } 28 | if (logEvent.Exception.InnerException != null) 29 | { 30 | InnerException = logEvent.Exception.InnerException.ToString(); 31 | } 32 | } 33 | if (logEvent.StackTrace != null) 34 | { 35 | StackTrace = logEvent.StackTrace.ToString(); 36 | } 37 | RowKey = String.Format("{0}__{1}", (DateTime.MaxValue.Ticks - DateTime.UtcNow.Ticks).ToString("d19"), Guid.NewGuid()); 38 | PartitionKey = !string.IsNullOrWhiteSpace(partitionKeyPrefix) 39 | ? partitionKeyPrefix + "." + LoggerName 40 | : LoggerName; 41 | MachineName = Environment.MachineName; 42 | } 43 | 44 | } 45 | 46 | private static string GetExceptionDataAsString(Exception exception) 47 | { 48 | var data = new StringBuilder(); 49 | foreach (DictionaryEntry entry in exception.Data) 50 | { 51 | data.AppendLine(entry.Key + "=" + entry.Value); 52 | } 53 | return data.ToString(); 54 | } 55 | 56 | public LogEntity() 57 | { 58 | } 59 | 60 | public string LogTimeStamp { get; set; } 61 | public string Level { get; set; } 62 | public string LoggerName { get; set; } 63 | public string Message { get; set; } 64 | public string Exception { get; set; } 65 | public string InnerException { get; set; } 66 | public string StackTrace { get; set; } 67 | public string MessageWithLayout { get; set; } 68 | public string ExceptionData { get; set; } 69 | public string MachineName { get; set; } 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /NLog.Extensions.AzureTableStorage/NLog.Extensions.AzureTableStorage.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {69B79032-F3C0-4087-B14E-54E7E91FC4A0} 8 | Library 9 | Properties 10 | NLog.Extensions.AzureTableStorage 11 | NLog.Extensions.AzureTableStorage 12 | v4.5 13 | 512 14 | ..\ 15 | true 16 | 17 | 18 | true 19 | full 20 | false 21 | bin\Debug\ 22 | DEBUG;TRACE 23 | prompt 24 | 4 25 | 26 | 27 | pdbonly 28 | true 29 | bin\Release\ 30 | TRACE 31 | prompt 32 | 4 33 | 34 | 35 | 36 | ..\packages\Microsoft.Azure.KeyVault.Core.2.0.4\lib\net45\Microsoft.Azure.KeyVault.Core.dll 37 | True 38 | 39 | 40 | ..\packages\Microsoft.Data.Edm.5.8.2\lib\net40\Microsoft.Data.Edm.dll 41 | True 42 | 43 | 44 | ..\packages\Microsoft.Data.OData.5.8.2\lib\net40\Microsoft.Data.OData.dll 45 | True 46 | 47 | 48 | ..\packages\Microsoft.Data.Services.Client.5.8.2\lib\net40\Microsoft.Data.Services.Client.dll 49 | True 50 | 51 | 52 | ..\packages\Microsoft.WindowsAzure.ConfigurationManager.3.2.3\lib\net40\Microsoft.WindowsAzure.Configuration.dll 53 | True 54 | 55 | 56 | ..\packages\WindowsAzure.Storage.8.1.1\lib\net45\Microsoft.WindowsAzure.Storage.dll 57 | True 58 | 59 | 60 | ..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll 61 | True 62 | 63 | 64 | ..\packages\NLog.4.4.4\lib\net45\NLog.dll 65 | True 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | ..\packages\System.Spatial.5.8.2\lib\net40\System.Spatial.dll 74 | True 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | Designer 93 | 94 | 95 | Designer 96 | 97 | 98 | 99 | 100 | 107 | -------------------------------------------------------------------------------- /NLog.Extensions.AzureTableStorage/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | using System.Resources; 5 | 6 | // General Information about an assembly is controlled through the following 7 | // set of attributes. Change these attribute values to modify the information 8 | // associated with an assembly. 9 | [assembly: AssemblyTitle("NLog.Extensions.AzureTableStorage")] 10 | [assembly: AssemblyDescription("Azure Table Storage Target for NLog")] 11 | [assembly: AssemblyConfiguration("")] 12 | [assembly: AssemblyCompany("harouny")] 13 | [assembly: AssemblyProduct("NLog.Extensions.AzureTableStorage")] 14 | [assembly: AssemblyCopyright("Copyright © 2014")] 15 | [assembly: AssemblyTrademark("")] 16 | [assembly: AssemblyCulture("")] 17 | 18 | // Setting ComVisible to false makes the types in this assembly not visible 19 | // to COM components. If you need to access a type in this assembly from 20 | // COM, set the ComVisible attribute to true on that type. 21 | [assembly: ComVisible(false)] 22 | 23 | // The following GUID is for the ID of the typelib if this project is exposed to COM 24 | [assembly: Guid("5f9b332d-1edb-4e18-bc2f-e1d5b5fbd76b")] 25 | 26 | // Version information for an assembly consists of the following four values: 27 | // 28 | // Major Version 29 | // Minor Version 30 | // Build Number 31 | // Revision 32 | // 33 | // You can specify all the values or you can default the Build and Revision Numbers 34 | // by using the '*' as shown below: 35 | // [assembly: AssemblyVersion("1.0.*")] 36 | [assembly: AssemblyVersion("1.0.0.4")] 37 | [assembly: AssemblyFileVersion("1.0.0.4")] 38 | [assembly: NeutralResourcesLanguageAttribute("en")] 39 | -------------------------------------------------------------------------------- /NLog.Extensions.AzureTableStorage/TableStorageManager.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.WindowsAzure.Storage.Table; 2 | 3 | namespace NLog.Extensions.AzureTableStorage 4 | { 5 | public class TableStorageManager 6 | { 7 | private readonly CloudTable _cloudTable; 8 | 9 | public TableStorageManager(ConfigManager configManager, string tableName) 10 | { 11 | var storageAccount = configManager.GetStorageAccount(); 12 | // Create the table client. 13 | var tableClient = storageAccount.CreateCloudTableClient(); 14 | //create charts table if not exists. 15 | _cloudTable = tableClient.GetTableReference(tableName); 16 | _cloudTable.CreateIfNotExists(); 17 | } 18 | 19 | public void Add(LogEntity entity) 20 | { 21 | var insertOperation = TableOperation.Insert(entity); 22 | _cloudTable.Execute(insertOperation); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /NLog.Extensions.AzureTableStorage/app.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /NLog.Extensions.AzureTableStorage/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /NLog.Extensions.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 2013 4 | VisualStudioVersion = 12.0.30723.0 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NLog.Extensions.AzureTableStorage", "NLog.Extensions.AzureTableStorage\NLog.Extensions.AzureTableStorage.csproj", "{69B79032-F3C0-4087-B14E-54E7E91FC4A0}" 7 | EndProject 8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NLog.Extensions.AzureTableStorage.Tests", "NLog.Extensions.AzureTableStorage.Tests\NLog.Extensions.AzureTableStorage.Tests.csproj", "{FFF58919-9BC6-4FFA-B0B4-2197F468813D}" 9 | EndProject 10 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{576BC019-896A-4287-9399-76FB1DEE0C2C}" 11 | ProjectSection(SolutionItems) = preProject 12 | .nuget\NuGet.Config = .nuget\NuGet.Config 13 | .nuget\NuGet.exe = .nuget\NuGet.exe 14 | .nuget\NuGet.targets = .nuget\NuGet.targets 15 | EndProjectSection 16 | EndProject 17 | Global 18 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 19 | Debug|Any CPU = Debug|Any CPU 20 | Release|Any CPU = Release|Any CPU 21 | EndGlobalSection 22 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 23 | {69B79032-F3C0-4087-B14E-54E7E91FC4A0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 24 | {69B79032-F3C0-4087-B14E-54E7E91FC4A0}.Debug|Any CPU.Build.0 = Debug|Any CPU 25 | {69B79032-F3C0-4087-B14E-54E7E91FC4A0}.Release|Any CPU.ActiveCfg = Release|Any CPU 26 | {69B79032-F3C0-4087-B14E-54E7E91FC4A0}.Release|Any CPU.Build.0 = Release|Any CPU 27 | {FFF58919-9BC6-4FFA-B0B4-2197F468813D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 28 | {FFF58919-9BC6-4FFA-B0B4-2197F468813D}.Debug|Any CPU.Build.0 = Debug|Any CPU 29 | {FFF58919-9BC6-4FFA-B0B4-2197F468813D}.Release|Any CPU.ActiveCfg = Release|Any CPU 30 | {FFF58919-9BC6-4FFA-B0B4-2197F468813D}.Release|Any CPU.Build.0 = Release|Any CPU 31 | EndGlobalSection 32 | GlobalSection(SolutionProperties) = preSolution 33 | HideSolutionNode = FALSE 34 | EndGlobalSection 35 | EndGlobal 36 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Note: This project is not actively maintained 2 | ============================================= 3 | 4 | NLog Azure Table Storage Target 5 | =============================== 6 | 7 | Azure Table Storage Target for NLog 8 | 9 | For more info about NLog targets and how to use it, refer to How To Write a Target 10 | 11 | Download 12 | ========== 13 | Download package from Nuget 14 | 15 | How to use 16 | ========== 17 | - Download package from Nuget. 18 | - If you didn't setup Azure storage connection string yet, follow instructions in Setup a storage connection string. 19 | - Open NLog configurations file ex: ```NLog.config``` and add the following lines: 20 | - Add ```NLog.Extensions.AzureTableStorage``` assemply to ```extensions``` section: 21 | `````xml 22 | 23 | 24 | 25 | ````` 26 | - Add ```AzureTableStorage``` target to ```targets``` section: 27 | `````xml 28 | 29 | 38 | 39 | ````` 40 | Where ```[[target-name]]``` is a name you give for the target, ```[[connection-string-key]]``` is the key of Azure Storage Account connection string setting in App Settings or Cloud Service configuration file, and ```[[table-name]]``` is a name you give to the log table that will be created. 41 | 42 | If multiple applications need to share the same storage account it is possible to prefix the partition keys used with a custom string. 43 | ```[[PartitionKeyPrefix]]``` and ```[[PartitionKeyPrefixKey]]``` are optional and ```[[PartitionKeyPrefixKey]]``` has precedence over a hard coded value in ```[[PartitionKeyPrefix]]```. 44 | Further, you can use ```[[PartitionKeyPrefixDateFormat]]``` to provide a standard DateTime format string to prefix the partition with, which may result in a better partitioning strategy in some use cases. 45 | 46 | Optionally specify a value for ```[[LogTimestampFormatString]]``` to override the default format string of "g" for the LogTimeStamp field. 47 | 48 | - Add a rule that uses the target in ```rules``` section. 49 | `````xml 50 | 51 | 52 | 53 | ````` 54 | 55 | Note: You can also configure this by code refer to How To Write a Target for more information. 56 | 57 | How to View Logs? 58 | ================= 59 | A lot of ways you can access table storage. 60 | - Cloud Portam 61 | - Azure Storage Explorer 62 | 63 | Notes 64 | ===== 65 | - Before running tests on you local machine, make sure Azure Storage Emulator is running. 66 | --------------------------------------------------------------------------------