From c247caba6dd7c3ac0c4d3411fb3f56dfc52e3a92 Mon Sep 17 00:00:00 2001 From: ihirt Date: Tue, 24 Nov 2015 17:36:45 +0100 Subject: [PATCH 1/4] Support for ASP.NET 5 Beta 8 --- AzureTableStorageNLogTarget.1.0.9.nupkg | Bin 8365 -> 0 bytes .../.gitignore | 206 ++++++++++++++++++ ...s.AzureTableStorage.EmptyApplication.xproj | 19 ++ .../NLog.config | 30 +++ .../Startup.cs | 60 +++++ .../appsettings.json | 5 + .../project.json | 33 +++ .../wwwroot/web.config | 9 + .../App.config | 26 --- .../AzureTableStorageTargetTests.cs | 115 +++++++--- ....Extensions.AzureTableStorage.Tests.csproj | 134 ------------ ...g.Extensions.AzureTableStorage.Tests.xproj | 21 ++ .../appsettings.json | 5 + .../packages.config | 19 -- .../project.json | 24 ++ NLog.Extensions.AzureTableStorage.sln | 47 ++++ .../AtsCoreServiceCollectionExtensions.cs | 15 ++ .../AtsOptions.cs | 25 +++ .../AzureTableStorageTarget.cs | 6 +- .../ConfigManager.cs | 11 +- .../NLog.Extensions.AzureTableStorage.csproj | 99 --------- .../NLog.Extensions.AzureTableStorage.xproj | 20 ++ .../NotNullAttribute.cs | 9 + .../Properties/AssemblyInfo.cs | 29 +-- .../TableStorageManager.cs | 4 +- NLog.Extensions.AzureTableStorage/app.config | 23 -- .../packages.config | 11 - .../project.json | 27 +++ NLog.Extensions.sln | 35 --- NuGet.Config | 8 + README.md | 21 +- global.json | 6 + 32 files changed, 679 insertions(+), 423 deletions(-) delete mode 100644 AzureTableStorageNLogTarget.1.0.9.nupkg create mode 100644 NLog.Extensions.AzureTableStorage.EmptyApplication/.gitignore create mode 100644 NLog.Extensions.AzureTableStorage.EmptyApplication/NLog.Extensions.AzureTableStorage.EmptyApplication.xproj create mode 100644 NLog.Extensions.AzureTableStorage.EmptyApplication/NLog.config create mode 100644 NLog.Extensions.AzureTableStorage.EmptyApplication/Startup.cs create mode 100644 NLog.Extensions.AzureTableStorage.EmptyApplication/appsettings.json create mode 100644 NLog.Extensions.AzureTableStorage.EmptyApplication/project.json create mode 100644 NLog.Extensions.AzureTableStorage.EmptyApplication/wwwroot/web.config delete mode 100644 NLog.Extensions.AzureTableStorage.Tests/App.config delete mode 100644 NLog.Extensions.AzureTableStorage.Tests/NLog.Extensions.AzureTableStorage.Tests.csproj create mode 100644 NLog.Extensions.AzureTableStorage.Tests/NLog.Extensions.AzureTableStorage.Tests.xproj create mode 100644 NLog.Extensions.AzureTableStorage.Tests/appsettings.json delete mode 100644 NLog.Extensions.AzureTableStorage.Tests/packages.config create mode 100644 NLog.Extensions.AzureTableStorage.Tests/project.json create mode 100644 NLog.Extensions.AzureTableStorage.sln create mode 100644 NLog.Extensions.AzureTableStorage/AtsCoreServiceCollectionExtensions.cs create mode 100644 NLog.Extensions.AzureTableStorage/AtsOptions.cs delete mode 100644 NLog.Extensions.AzureTableStorage/NLog.Extensions.AzureTableStorage.csproj create mode 100644 NLog.Extensions.AzureTableStorage/NLog.Extensions.AzureTableStorage.xproj create mode 100644 NLog.Extensions.AzureTableStorage/NotNullAttribute.cs delete mode 100644 NLog.Extensions.AzureTableStorage/app.config delete mode 100644 NLog.Extensions.AzureTableStorage/packages.config create mode 100644 NLog.Extensions.AzureTableStorage/project.json delete mode 100644 NLog.Extensions.sln create mode 100644 NuGet.Config create mode 100644 global.json diff --git a/AzureTableStorageNLogTarget.1.0.9.nupkg b/AzureTableStorageNLogTarget.1.0.9.nupkg deleted file mode 100644 index 477705442c984e5a6eb4eed295f58c27d0f2f1d6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8365 zcmb`M2Ut_t7VqgGNLLU+480QqNbhy%y^9z^2%#j9gx&-dkgAA?(xgb0-n*b6ARPhe z2!ixp6e%yDGvmy?ciw&PyUBM>zJ2!kuf5hjYoC*E|Ma!+2}p6yKDqZp)B<$&O>ywB z4eUXN!-Qjlf;yvtf@fzy`V}1R7njaW|9;x2Ym$-oa&ZQDKv8Ho5+Tb95)@(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B7A)e>{{y#}4bn6sF$q*DcI4|aFPU=#jHA!J$4&@3z9 zXYfDZC)m~184fu|q(BdZ-QResz|W`B8Pxp~qw-<%JtuqrW{BT$=YJdo3Bf?I>=esA z|BV_8MgAeaf0X{tA^+pR|B&6^KMfnA~p%xA6t18hf_)c^nh diff --git a/NLog.Extensions.AzureTableStorage.EmptyApplication/.gitignore b/NLog.Extensions.AzureTableStorage.EmptyApplication/.gitignore new file mode 100644 index 0000000..97e402e --- /dev/null +++ b/NLog.Extensions.AzureTableStorage.EmptyApplication/.gitignore @@ -0,0 +1,206 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. + +# User-specific files +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +build/ +bld/ +[Bb]in/ +[Oo]bj/ + +# Visual Studio 2015 cache/options directory +.vs/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUNIT +*.VisualState.xml +TestResult.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# DNX +project.lock.json +artifacts/ + +*_i.c +*_p.c +*_i.h +*.ilk +*.meta +*.obj +*.pch +*.pdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opensdf +*.sdf +*.cachefile + +# Visual Studio profiler +*.psess +*.vsp +*.vspx + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# NCrunch +_NCrunch_* +.*crunch*.local.xml + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# TODO: Comment the next line if you want to checkin your web deploy settings +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# NuGet Packages +*.nupkg +# The packages folder can be ignored because of Package Restore +**/packages/* +# except build/, which is used as an MSBuild target. +!**/packages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/packages/repositories.config + +# Windows Azure Build Output +csx/ +*.build.csdef + +# Windows Store app package directory +AppPackages/ + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!*.[Cc]ache/ + +# Others +ClientBin/ +[Ss]tyle[Cc]op.* +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.pfx +*.publishsettings +node_modules/ +bower_components/ +orleans.codegen.cs + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm + +# SQL Server files +*.mdf +*.ldf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings + +# Microsoft Fakes +FakesAssemblies/ + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt diff --git a/NLog.Extensions.AzureTableStorage.EmptyApplication/NLog.Extensions.AzureTableStorage.EmptyApplication.xproj b/NLog.Extensions.AzureTableStorage.EmptyApplication/NLog.Extensions.AzureTableStorage.EmptyApplication.xproj new file mode 100644 index 0000000..98bef58 --- /dev/null +++ b/NLog.Extensions.AzureTableStorage.EmptyApplication/NLog.Extensions.AzureTableStorage.EmptyApplication.xproj @@ -0,0 +1,19 @@ + + + + 14.0 + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) + + + + 87d6bdf5-8313-45be-90ce-d0f8f15c44a9 + EmptyApplication + ..\artifacts\obj\$(MSBuildProjectName) + ..\artifacts\bin\$(MSBuildProjectName)\ + + + + 2.0 + + + \ No newline at end of file diff --git a/NLog.Extensions.AzureTableStorage.EmptyApplication/NLog.config b/NLog.Extensions.AzureTableStorage.EmptyApplication/NLog.config new file mode 100644 index 0000000..da83444 --- /dev/null +++ b/NLog.Extensions.AzureTableStorage.EmptyApplication/NLog.config @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + diff --git a/NLog.Extensions.AzureTableStorage.EmptyApplication/Startup.cs b/NLog.Extensions.AzureTableStorage.EmptyApplication/Startup.cs new file mode 100644 index 0000000..ce8e849 --- /dev/null +++ b/NLog.Extensions.AzureTableStorage.EmptyApplication/Startup.cs @@ -0,0 +1,60 @@ + +using System.IO; +using Microsoft.AspNet.Builder; +using Microsoft.AspNet.Hosting; +using Microsoft.AspNet.Http; +using Microsoft.Dnx.Runtime; +using Microsoft.Framework.Configuration; +using Microsoft.Framework.DependencyInjection; +using Microsoft.Framework.Logging; + +namespace NLog.Extensions.AzureTableStorage.EmptyApplication +{ + public class Startup + { + private Microsoft.Framework.Logging.ILogger _log; + private string logConfigurationFile = string.Empty; + + public Startup(IHostingEnvironment env, IApplicationEnvironment appEnv) + { + // Setup configuration sources. + + var builder = new ConfigurationBuilder() + .SetBasePath(appEnv.ApplicationBasePath) + .AddJsonFile("appsettings.json") + .AddJsonFile($"appsettings.{env.EnvironmentName}.json", optional: true); + logConfigurationFile = Path.Combine(appEnv.ApplicationBasePath, "NLog.config"); + + builder.AddEnvironmentVariables(); + Configuration = builder.Build(); + } + + public IConfigurationRoot Configuration { get; set; } + + public void ConfigureServices(IServiceCollection services) + { + // Configure AtsOption for NLog.Extensions.AzureTableStorage + services.ConfigureAts(options => { + options.StorageAccountConnectionString = Configuration["AppSettings:StorageAccountConnectionString"]; + }); + } + + public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory) + { + // add NLog for logging + loggerFactory.AddNLog(new LogFactory(new NLog.Config.XmlLoggingConfiguration(logConfigurationFile))); + _log = loggerFactory.CreateLogger(); + + // generate some log output + _log.LogInformation("Happy table logging!"); + _log.LogInformation(string.Format("Log configuration: {0}", logConfigurationFile)); + + app.UseIISPlatformHandler(); + + app.Run(async (context) => + { + await context.Response.WriteAsync("Hello World!"); + }); + } + } +} diff --git a/NLog.Extensions.AzureTableStorage.EmptyApplication/appsettings.json b/NLog.Extensions.AzureTableStorage.EmptyApplication/appsettings.json new file mode 100644 index 0000000..74ddae3 --- /dev/null +++ b/NLog.Extensions.AzureTableStorage.EmptyApplication/appsettings.json @@ -0,0 +1,5 @@ +{ + "AppSettings": { + "StorageAccountConnectionString": "UseDevelopmentStorage=true" + } +} diff --git a/NLog.Extensions.AzureTableStorage.EmptyApplication/project.json b/NLog.Extensions.AzureTableStorage.EmptyApplication/project.json new file mode 100644 index 0000000..61a9477 --- /dev/null +++ b/NLog.Extensions.AzureTableStorage.EmptyApplication/project.json @@ -0,0 +1,33 @@ +{ + "version": "1.0.0-*", + + "tooling": { + "defaultNamespace": "NLog.Extensions.AzureTableStorage.EmptyApplication" + }, + + "dependencies": { + "Microsoft.AspNet.IISPlatformHandler": "1.0.0-beta8", + "Microsoft.AspNet.Server.Kestrel": "1.0.0-beta8", + "Microsoft.AspNet.Hosting": "1.0.0-beta8", + "Microsoft.Framework.DependencyInjection": "1.0.0-beta8", + "Microsoft.Framework.Logging.NLog": "1.0.0-beta8-*", + "NLog.Extensions.AzureTableStorage": "" + }, + + "commands": { + "web": "Microsoft.AspNet.Server.Kestrel" + }, + + "frameworks": { + "dnx451": { } + }, + + "exclude": [ + "wwwroot", + "node_modules" + ], + "publishExclude": [ + "**.user", + "**.vspscc" + ] +} diff --git a/NLog.Extensions.AzureTableStorage.EmptyApplication/wwwroot/web.config b/NLog.Extensions.AzureTableStorage.EmptyApplication/wwwroot/web.config new file mode 100644 index 0000000..e70a777 --- /dev/null +++ b/NLog.Extensions.AzureTableStorage.EmptyApplication/wwwroot/web.config @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/NLog.Extensions.AzureTableStorage.Tests/App.config b/NLog.Extensions.AzureTableStorage.Tests/App.config deleted file mode 100644 index dab5818..0000000 --- a/NLog.Extensions.AzureTableStorage.Tests/App.config +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/NLog.Extensions.AzureTableStorage.Tests/AzureTableStorageTargetTests.cs b/NLog.Extensions.AzureTableStorage.Tests/AzureTableStorageTargetTests.cs index dc546ff..1fb91dd 100644 --- a/NLog.Extensions.AzureTableStorage.Tests/AzureTableStorageTargetTests.cs +++ b/NLog.Extensions.AzureTableStorage.Tests/AzureTableStorageTargetTests.cs @@ -1,44 +1,75 @@ using Microsoft.Azure; +using Microsoft.Framework.Configuration; using Microsoft.WindowsAzure.Storage; using Microsoft.WindowsAzure.Storage.Table; using System; using System.Collections.Generic; using System.Linq; +using System.Threading; +using System.Threading.Tasks; using Xunit; namespace NLog.Extensions.AzureTableStorage.Tests { + public static class Extensions + { + public static async Task> ExecuteQueryAsync(this CloudTable table, TableQuery query, CancellationToken ct = default(CancellationToken), Action> onProgress = null) where T : ITableEntity, new() + { + var items = new List(); + TableContinuationToken token = null; + + do + { + TableQuerySegment seg = await table.ExecuteQuerySegmentedAsync(query, token); + token = seg.ContinuationToken; + items.AddRange(seg); + if (onProgress != null) onProgress(items); + + } while (token != null && !ct.IsCancellationRequested); + + return items; + } + } + public class AzureTableStorageTargetTests : IDisposable { private readonly Logger _logger; private readonly CloudTable _cloudTable; private const string TargetTableName = "TempAzureTableStorageTargetTestsLogs"; //must match table name in AzureTableStorage target in NLog.config + public void SetupAction(AtsOptions options) + { + var cb = new ConfigurationBuilder().AddJsonFile("appsettings.json"); + IConfigurationRoot config = cb.Build(); + options.StorageAccountConnectionString = config["AppSettings:StorageAccountConnectionString"]; + } + public AzureTableStorageTargetTests() { try { - _logger = LogManager.GetLogger(GetType().ToString()); + AtsCoreServiceCollectionExtensions.ConfigureAts(null, SetupAction); + LogManager.Configuration = new NLog.Config.XmlLoggingConfiguration("NLog.config"); + _logger = LogManager.GetCurrentClassLogger(); var storageAccount = GetStorageAccount(); // Create the table client. var tableClient = storageAccount.CreateCloudTableClient(); //create charts table if not exists. _cloudTable = tableClient.GetTableReference(TargetTableName); - _cloudTable.CreateIfNotExists(); + _cloudTable.CreateIfNotExistsAsync().Wait(); } catch (Exception ex) { throw new Exception("Failed to initialize tests, make sure Azure Storage Emulator is running.", ex); } - } [Fact] - public void CanLogInformation() + public async Task CanLogInformation() { - Assert.True(GetLogEntities().Count == 0); + Assert.True((await GetLogEntities()).Count == 0); _logger.Log(LogLevel.Info, "information"); - var entities = GetLogEntities(); + var entities = await GetLogEntities(); var entity = entities.Single(); Assert.True(entities.Count == 1); Assert.Equal("information", entity.Message); @@ -47,11 +78,11 @@ public void CanLogInformation() } [Fact] - public void CanLogExceptions() + public async Task CanLogExceptions() { - Assert.True(GetLogEntities().Count == 0); - _logger.Log(LogLevel.Error, "exception message", (Exception)new NullReferenceException()); - var entities = GetLogEntities(); + Assert.True((await GetLogEntities()).Count == 0); + _logger.Log(LogLevel.Error, new NullReferenceException(), "exception message"); + var entities = await GetLogEntities(); var entity = entities.Single(); Assert.True(entities.Count == 1); Assert.Equal("exception message", entity.Message); @@ -61,45 +92,43 @@ public void CanLogExceptions() } [Fact] - public void IncludeExceptionFormattedMessengerInLoggedRow() + public async Task IncludeExceptionFormattedMessengerInLoggedRow() { _logger.Debug("exception message {0} and {1}.", 2010, 2014); - var entity = GetLogEntities().Single(); + var entity = (await GetLogEntities()).Single(); Assert.Equal("exception message 2010 and 2014.", entity.Message); } [Fact] - public void IncludeExceptionDataInLoggedRow() + public async Task IncludeExceptionDataInLoggedRow() { var exception = new NullReferenceException(); var errorId = Guid.NewGuid(); exception.Data["id"] = errorId; exception.Data["name"] = "ahmed"; - _logger.Log(LogLevel.Error, "execption messege", (Exception)exception); - var entities = GetLogEntities(); + _logger.Log(LogLevel.Error, exception, "execption message"); + var entities = await GetLogEntities(); var entity = entities.Single(); Assert.True(entity.ExceptionData.Contains(errorId.ToString())); Assert.True(entity.ExceptionData.Contains("name=ahmed")); } - [Fact] - public void IncludeExceptionDetailsInLoggedRow() + public async Task IncludeExceptionDetailsInLoggedRow() { var exception = new NullReferenceException(); - _logger.Log(LogLevel.Error, "execption messege", (Exception)exception); - var entity = GetLogEntities().Single(); + _logger.Log(LogLevel.Error, exception, "execption message"); + var entity = (await GetLogEntities()).Single(); Assert.NotNull(entity.Exception); Assert.Equal(exception.ToString().ExceptBlanks(), entity.Exception.ExceptBlanks()); } - [Fact] - public void IncludeInnerExceptionDetailsInLoggedRow() + public async Task IncludeInnerExceptionDetailsInLoggedRow() { var exception = new NullReferenceException("exception message", new DivideByZeroException()); - _logger.Log(LogLevel.Error, "execption messege", (Exception)exception); - var entity = GetLogEntities().Single(); + _logger.Log(LogLevel.Error, exception, "execption message"); + var entity = (await GetLogEntities()).Single(); Assert.NotNull(entity.Exception); Assert.Equal(exception.ToString().ExceptBlanks(), entity.Exception.ExceptBlanks()); Assert.NotNull(entity.InnerException); @@ -107,29 +136,29 @@ public void IncludeInnerExceptionDetailsInLoggedRow() } [Fact] - public void IncludePartitionKeyPrefix() + public async Task IncludePartitionKeyPrefix() { var exception = new NullReferenceException(); - _logger.Log(LogLevel.Error, "execption messege", (Exception)exception); - var entity = GetLogEntities().Single(); + _logger.Log(LogLevel.Error, exception, "execption message"); + var entity = (await GetLogEntities()).Single(); Assert.True(entity.PartitionKey.Contains("customPrefix")); } [Fact] - public void IncludeMachineName() + public async Task IncludeMachineName() { var exception = new NullReferenceException(); - _logger.Log(LogLevel.Error, "execption messege", (Exception)exception); - var entity = GetLogEntities().Single(); + _logger.Log(LogLevel.Error, exception, "execption message"); + var entity = (await GetLogEntities()).Single(); Assert.Equal(entity.MachineName, Environment.MachineName); } [Fact] - public void IncludeGuidAndTimeComponentInRowKey() + public async Task IncludeGuidAndTimeComponentInRowKey() { var exception = new NullReferenceException(); - _logger.Log(LogLevel.Error, "execption messege", (Exception)exception); - var entity = GetLogEntities().Single(); + _logger.Log(LogLevel.Error, (Exception)exception, "execption message"); + var entity = (await GetLogEntities()).Single(); const string splitter = "__"; Assert.True(entity.RowKey.Contains(splitter)); var splitterArray = "__".ToCharArray(); @@ -144,25 +173,39 @@ public void IncludeGuidAndTimeComponentInRowKey() private string GetStorageAccountConnectionString() { - return CloudConfigurationManager.GetSetting("StorageAccountConnectionString"); + //try get connection string from app settings or cloud service config + var connectionStringValue = CloudConfigurationManager.GetSetting("StorageAccountConnectionString"); + if (string.IsNullOrEmpty(connectionStringValue)) + { + //try get connection string from configured AtsOptions + connectionStringValue = AtsOptions.Instance.StorageAccountConnectionString; + } + + return connectionStringValue; } + private CloudStorageAccount GetStorageAccount() { var connectionString = GetStorageAccountConnectionString(); var storageAccount = CloudStorageAccount.Parse(connectionString); return storageAccount; } - private List GetLogEntities() + + private async Task> GetLogEntities() { // Construct the query operation for all customer entities where PartitionKey="Smith". var query = new TableQuery() .Where(TableQuery.GenerateFilterCondition("PartitionKey", QueryComparisons.Equal, "customPrefix." + GetType())); - var entities = _cloudTable.ExecuteQuery(query); + //var entities = _cloudTable.ExecuteQuery(query); + IList entities = await _cloudTable.ExecuteQueryAsync(query); + return entities.ToList(); } + public void Dispose() { - _cloudTable.DeleteIfExists(); + //_cloudTable.DeleteIfExists(); + _cloudTable.DeleteIfExistsAsync().Wait(); } } } diff --git a/NLog.Extensions.AzureTableStorage.Tests/NLog.Extensions.AzureTableStorage.Tests.csproj b/NLog.Extensions.AzureTableStorage.Tests/NLog.Extensions.AzureTableStorage.Tests.csproj deleted file mode 100644 index 50b5552..0000000 --- a/NLog.Extensions.AzureTableStorage.Tests/NLog.Extensions.AzureTableStorage.Tests.csproj +++ /dev/null @@ -1,134 +0,0 @@ - - - - - - - Debug - AnyCPU - {FFF58919-9BC6-4FFA-B0B4-2197F468813D} - Library - Properties - NLog.Extensions.AzureTableStorage.Tests - NLog.Extensions.AzureTableStorage.Tests - v4.5 - 512 - ..\ - true - 5f660091 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - False - ..\packages\Microsoft.Data.Edm.5.6.4\lib\net40\Microsoft.Data.Edm.dll - - - False - ..\packages\Microsoft.Data.OData.5.6.4\lib\net40\Microsoft.Data.OData.dll - - - False - ..\packages\Microsoft.Data.Services.Client.5.6.4\lib\net40\Microsoft.Data.Services.Client.dll - - - False - ..\packages\Microsoft.WindowsAzure.ConfigurationManager.3.1.0\lib\net40\Microsoft.WindowsAzure.Configuration.dll - - - False - ..\packages\WindowsAzure.Storage.4.3.0\lib\net40\Microsoft.WindowsAzure.Storage.dll - - - ..\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll - - - ..\packages\NLog.3.2.0.0\lib\net45\NLog.dll - - - - - - False - ..\packages\System.Spatial.5.6.4\lib\net40\System.Spatial.dll - - - - - - - - False - ..\packages\xunit.abstractions.2.0.0\lib\net35\xunit.abstractions.dll - - - False - ..\packages\xunit.assert.2.0.0\lib\portable-net45+win+wpa81+wp80+monotouch+monoandroid+Xamarin.iOS\xunit.assert.dll - - - False - ..\packages\xunit.extensibility.core.2.0.0\lib\portable-net45+win+wpa81+wp80+monotouch+monoandroid+Xamarin.iOS\xunit.core.dll - - - - - - - - - - - Always - - - Always - - - Designer - - - Designer - - - - - {69b79032-f3c0-4087-b14e-54e7e91fc4a0} - NLog.Extensions.AzureTableStorage - - - - - - - - - - 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}. - - - - - - \ No newline at end of file diff --git a/NLog.Extensions.AzureTableStorage.Tests/NLog.Extensions.AzureTableStorage.Tests.xproj b/NLog.Extensions.AzureTableStorage.Tests/NLog.Extensions.AzureTableStorage.Tests.xproj new file mode 100644 index 0000000..e06d667 --- /dev/null +++ b/NLog.Extensions.AzureTableStorage.Tests/NLog.Extensions.AzureTableStorage.Tests.xproj @@ -0,0 +1,21 @@ + + + + 14.0 + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) + + + + 2f71836f-3707-4779-829e-ba7f474fff86 + NLog.Extensions.AzureTableStorage.Tests + ..\..\artifacts\obj\$(MSBuildProjectName) + ..\..\artifacts\bin\$(MSBuildProjectName)\ + + + 2.0 + + + + + + \ No newline at end of file diff --git a/NLog.Extensions.AzureTableStorage.Tests/appsettings.json b/NLog.Extensions.AzureTableStorage.Tests/appsettings.json new file mode 100644 index 0000000..74ddae3 --- /dev/null +++ b/NLog.Extensions.AzureTableStorage.Tests/appsettings.json @@ -0,0 +1,5 @@ +{ + "AppSettings": { + "StorageAccountConnectionString": "UseDevelopmentStorage=true" + } +} diff --git a/NLog.Extensions.AzureTableStorage.Tests/packages.config b/NLog.Extensions.AzureTableStorage.Tests/packages.config deleted file mode 100644 index 680bc8a..0000000 --- a/NLog.Extensions.AzureTableStorage.Tests/packages.config +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/NLog.Extensions.AzureTableStorage.Tests/project.json b/NLog.Extensions.AzureTableStorage.Tests/project.json new file mode 100644 index 0000000..85e82a1 --- /dev/null +++ b/NLog.Extensions.AzureTableStorage.Tests/project.json @@ -0,0 +1,24 @@ +{ + "version": "1.0.0-*", + "description": "NLog.Extensions.AzureTableStorage.Tests Class Library", + "authors": [ "greenliff.com" ], + "tags": [ "" ], + "projectUrl": "", + "licenseUrl": "", + + "dependencies": { + "Microsoft.Framework.Configuration": "1.0.0-beta8", + "Microsoft.Framework.OptionsModel": "1.0.0-beta8-*", + "NLog.Extensions.AzureTableStorage": "", + "xunit": "2.1.0-rc2-build3176", + "xunit.runner.dnx": "2.1.0-beta6-build191" + }, + + "frameworks": { + "dnx451": { } + }, + + "commands": { + "test": "xunit.runner.dnx" + } +} diff --git a/NLog.Extensions.AzureTableStorage.sln b/NLog.Extensions.AzureTableStorage.sln new file mode 100644 index 0000000..03d7938 --- /dev/null +++ b/NLog.Extensions.AzureTableStorage.sln @@ -0,0 +1,47 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 14 +VisualStudioVersion = 14.0.23107.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{625E4C17-5831-4FF2-914C-C3E326941B87}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{3EF3BC13-E023-45DC-959A-6A6C0F97C744}" + ProjectSection(SolutionItems) = preProject + global.json = global.json + NuGet.Config = NuGet.Config + EndProjectSection +EndProject +Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "NLog.Extensions.AzureTableStorage", "NLog.Extensions.AzureTableStorage\NLog.Extensions.AzureTableStorage.xproj", "{F27F5ACA-07BD-486D-818C-CC5B26D3446B}" +EndProject +Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "NLog.Extensions.AzureTableStorage.Tests", "NLog.Extensions.AzureTableStorage.Tests\NLog.Extensions.AzureTableStorage.Tests.xproj", "{2F71836F-3707-4779-829E-BA7F474FFF86}" +EndProject +Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "NLog.Extensions.AzureTableStorage.EmptyApplication", "NLog.Extensions.AzureTableStorage.EmptyApplication\NLog.Extensions.AzureTableStorage.EmptyApplication.xproj", "{87D6BDF5-8313-45BE-90CE-D0F8F15C44A9}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {F27F5ACA-07BD-486D-818C-CC5B26D3446B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F27F5ACA-07BD-486D-818C-CC5B26D3446B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F27F5ACA-07BD-486D-818C-CC5B26D3446B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F27F5ACA-07BD-486D-818C-CC5B26D3446B}.Release|Any CPU.Build.0 = Release|Any CPU + {2F71836F-3707-4779-829E-BA7F474FFF86}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2F71836F-3707-4779-829E-BA7F474FFF86}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2F71836F-3707-4779-829E-BA7F474FFF86}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2F71836F-3707-4779-829E-BA7F474FFF86}.Release|Any CPU.Build.0 = Release|Any CPU + {87D6BDF5-8313-45BE-90CE-D0F8F15C44A9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {87D6BDF5-8313-45BE-90CE-D0F8F15C44A9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {87D6BDF5-8313-45BE-90CE-D0F8F15C44A9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {87D6BDF5-8313-45BE-90CE-D0F8F15C44A9}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {F27F5ACA-07BD-486D-818C-CC5B26D3446B} = {625E4C17-5831-4FF2-914C-C3E326941B87} + {2F71836F-3707-4779-829E-BA7F474FFF86} = {625E4C17-5831-4FF2-914C-C3E326941B87} + {87D6BDF5-8313-45BE-90CE-D0F8F15C44A9} = {625E4C17-5831-4FF2-914C-C3E326941B87} + EndGlobalSection +EndGlobal diff --git a/NLog.Extensions.AzureTableStorage/AtsCoreServiceCollectionExtensions.cs b/NLog.Extensions.AzureTableStorage/AtsCoreServiceCollectionExtensions.cs new file mode 100644 index 0000000..a2460cb --- /dev/null +++ b/NLog.Extensions.AzureTableStorage/AtsCoreServiceCollectionExtensions.cs @@ -0,0 +1,15 @@ +using System; +using Microsoft.Framework.DependencyInjection; + +namespace NLog.Extensions.AzureTableStorage +{ + public static class AtsCoreServiceCollectionExtensions + { + public static void ConfigureAts(this IServiceCollection services, + [NotNull] Action setupAction) + { + var options = AtsOptions.Instance; + setupAction(options); + } + } +} diff --git a/NLog.Extensions.AzureTableStorage/AtsOptions.cs b/NLog.Extensions.AzureTableStorage/AtsOptions.cs new file mode 100644 index 0000000..40540b0 --- /dev/null +++ b/NLog.Extensions.AzureTableStorage/AtsOptions.cs @@ -0,0 +1,25 @@ +using System; + +namespace NLog.Extensions.AzureTableStorage +{ + public class AtsOptions + { + private static AtsOptions _instance; + + public string StorageAccountConnectionString { get; set; } + + private AtsOptions() { } + + public static AtsOptions Instance + { + get + { + if (_instance == null) + { + _instance = new AtsOptions(); + } + return _instance; + } + } + } +} diff --git a/NLog.Extensions.AzureTableStorage/AzureTableStorageTarget.cs b/NLog.Extensions.AzureTableStorage/AzureTableStorageTarget.cs index 5925a0a..8a309f9 100644 --- a/NLog.Extensions.AzureTableStorage/AzureTableStorageTarget.cs +++ b/NLog.Extensions.AzureTableStorage/AzureTableStorageTarget.cs @@ -1,5 +1,5 @@ using System; -using System.ComponentModel.DataAnnotations; +using NLog.Config; using NLog.Targets; namespace NLog.Extensions.AzureTableStorage @@ -10,10 +10,10 @@ public class AzureTableStorageTarget : TargetWithLayout private ConfigManager _configManager; private TableStorageManager _tableStorageManager; - [Required] + [RequiredParameter] public string ConnectionStringKey { get; set; } - [Required] + [RequiredParameter] public string TableName { get; set; } public string PartitionKeyPrefix { get; set; } diff --git a/NLog.Extensions.AzureTableStorage/ConfigManager.cs b/NLog.Extensions.AzureTableStorage/ConfigManager.cs index 8fc2c7b..f6f7e30 100644 --- a/NLog.Extensions.AzureTableStorage/ConfigManager.cs +++ b/NLog.Extensions.AzureTableStorage/ConfigManager.cs @@ -1,6 +1,5 @@ using Microsoft.Azure; using Microsoft.WindowsAzure.Storage; -using System.Configuration; namespace NLog.Extensions.AzureTableStorage { @@ -17,14 +16,12 @@ private string GetStorageAccountConnectionString() { //try get connection string from app settings or cloud service config var connectionStringValue = CloudConfigurationManager.GetSetting(_connectionStringKey); - if (!string.IsNullOrEmpty(connectionStringValue)) return connectionStringValue; - - //try get connection string from ConfigurationManager.ConnectionStrings - var connectionString = ConfigurationManager.ConnectionStrings[_connectionStringKey]; - if (connectionString != null) + if (string.IsNullOrEmpty(connectionStringValue)) { - connectionStringValue = connectionString.ConnectionString; + //try get connection string from configured AtsOptions + connectionStringValue = AtsOptions.Instance.StorageAccountConnectionString; } + return connectionStringValue; } diff --git a/NLog.Extensions.AzureTableStorage/NLog.Extensions.AzureTableStorage.csproj b/NLog.Extensions.AzureTableStorage/NLog.Extensions.AzureTableStorage.csproj deleted file mode 100644 index 8648322..0000000 --- a/NLog.Extensions.AzureTableStorage/NLog.Extensions.AzureTableStorage.csproj +++ /dev/null @@ -1,99 +0,0 @@ - - - - - Debug - AnyCPU - {69B79032-F3C0-4087-B14E-54E7E91FC4A0} - Library - Properties - NLog.Extensions.AzureTableStorage - NLog.Extensions.AzureTableStorage - v4.5 - 512 - ..\ - true - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - False - ..\packages\Microsoft.Data.Edm.5.6.4\lib\net40\Microsoft.Data.Edm.dll - - - False - ..\packages\Microsoft.Data.OData.5.6.4\lib\net40\Microsoft.Data.OData.dll - - - False - ..\packages\Microsoft.Data.Services.Client.5.6.4\lib\net40\Microsoft.Data.Services.Client.dll - - - False - ..\packages\Microsoft.WindowsAzure.ConfigurationManager.3.1.0\lib\net40\Microsoft.WindowsAzure.Configuration.dll - - - False - ..\packages\WindowsAzure.Storage.4.3.0\lib\net40\Microsoft.WindowsAzure.Storage.dll - - - False - ..\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll - - - False - ..\packages\NLog.3.2.0.0\lib\net45\NLog.dll - - - - - - - - False - ..\packages\System.Spatial.5.6.4\lib\net40\System.Spatial.dll - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/NLog.Extensions.AzureTableStorage/NLog.Extensions.AzureTableStorage.xproj b/NLog.Extensions.AzureTableStorage/NLog.Extensions.AzureTableStorage.xproj new file mode 100644 index 0000000..7ff5d3a --- /dev/null +++ b/NLog.Extensions.AzureTableStorage/NLog.Extensions.AzureTableStorage.xproj @@ -0,0 +1,20 @@ + + + + 14.0 + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) + + + + + f27f5aca-07bd-486d-818c-cc5b26d3446b + NLog.Extensions.AzureTableStorage + ..\..\artifacts\obj\$(MSBuildProjectName) + ..\..\artifacts\bin\$(MSBuildProjectName)\ + + + + 2.0 + + + diff --git a/NLog.Extensions.AzureTableStorage/NotNullAttribute.cs b/NLog.Extensions.AzureTableStorage/NotNullAttribute.cs new file mode 100644 index 0000000..39188fe --- /dev/null +++ b/NLog.Extensions.AzureTableStorage/NotNullAttribute.cs @@ -0,0 +1,9 @@ +using System; + +namespace NLog.Extensions.AzureTableStorage +{ + [AttributeUsage(AttributeTargets.Parameter, AllowMultiple = false)] + internal sealed class NotNullAttribute : Attribute + { + } +} diff --git a/NLog.Extensions.AzureTableStorage/Properties/AssemblyInfo.cs b/NLog.Extensions.AzureTableStorage/Properties/AssemblyInfo.cs index 46edf5a..c244197 100644 --- a/NLog.Extensions.AzureTableStorage/Properties/AssemblyInfo.cs +++ b/NLog.Extensions.AzureTableStorage/Properties/AssemblyInfo.cs @@ -1,38 +1,23 @@ using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -using System.Resources; -// General Information about an assembly is controlled through the following +// General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("NLog.Extensions.AzureTableStorage")] -[assembly: AssemblyDescription("Azure Table Storage Target for NLog")] +[assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("harouny")] +[assembly: AssemblyCompany("")] [assembly: AssemblyProduct("NLog.Extensions.AzureTableStorage")] -[assembly: AssemblyCopyright("Copyright © 2014")] +[assembly: AssemblyCopyright("Copyright © 2015")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] // The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("5f9b332d-1edb-4e18-bc2f-e1d5b5fbd76b")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.4")] -[assembly: AssemblyFileVersion("1.0.0.4")] -[assembly: NeutralResourcesLanguageAttribute("en")] +[assembly: Guid("f27f5aca-07bd-486d-818c-cc5b26d3446b")] diff --git a/NLog.Extensions.AzureTableStorage/TableStorageManager.cs b/NLog.Extensions.AzureTableStorage/TableStorageManager.cs index 56a1ac1..f9223de 100644 --- a/NLog.Extensions.AzureTableStorage/TableStorageManager.cs +++ b/NLog.Extensions.AzureTableStorage/TableStorageManager.cs @@ -13,13 +13,13 @@ public TableStorageManager(ConfigManager configManager, string tableName) var tableClient = storageAccount.CreateCloudTableClient(); //create charts table if not exists. _cloudTable = tableClient.GetTableReference(tableName); - _cloudTable.CreateIfNotExists(); + _cloudTable.CreateIfNotExistsAsync().Wait(); } public void Add(LogEntity entity) { var insertOperation = TableOperation.Insert(entity); - _cloudTable.Execute(insertOperation); + _cloudTable.ExecuteAsync(insertOperation).Wait(); ; } } } diff --git a/NLog.Extensions.AzureTableStorage/app.config b/NLog.Extensions.AzureTableStorage/app.config deleted file mode 100644 index 64f8844..0000000 --- a/NLog.Extensions.AzureTableStorage/app.config +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/NLog.Extensions.AzureTableStorage/packages.config b/NLog.Extensions.AzureTableStorage/packages.config deleted file mode 100644 index 5c54981..0000000 --- a/NLog.Extensions.AzureTableStorage/packages.config +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/NLog.Extensions.AzureTableStorage/project.json b/NLog.Extensions.AzureTableStorage/project.json new file mode 100644 index 0000000..2ab52b1 --- /dev/null +++ b/NLog.Extensions.AzureTableStorage/project.json @@ -0,0 +1,27 @@ +{ + "version": "1.0.0-*", + "description": "NLog.Extensions.AzureTableStorage Class Library", + "authors": [ "greenliff.com" ], + "tags": [ "" ], + "projectUrl": "", + "licenseUrl": "", + + "dependencies": { + "Microsoft.Data.Edm": "5.6.2", + "Microsoft.Data.OData": "5.6.2", + "Microsoft.Data.Services.Client": "5.6.2", + "Microsoft.Framework.Configuration": "1.0.0-beta8", + "Microsoft.Framework.Configuration.Json": "1.0.0-beta8", + "Microsoft.WindowsAzure.ConfigurationManager": "3.1.0", + "Microsoft.Extensions.NotNullAttribute.Sources": "1.0.0-rc1-15718", + "Microsoft.Framework.DependencyInjection": "1.0.0-beta8", + "Newtonsoft.Json": "7.0.1", + "NLog": "4.2.1", + "System.Spatial": "5.6.2", + "WindowsAzure.Storage": "6.1.1-preview" + }, + + "frameworks": { + "dnx451": { } + } +} diff --git a/NLog.Extensions.sln b/NLog.Extensions.sln deleted file mode 100644 index 5a1f985..0000000 --- a/NLog.Extensions.sln +++ /dev/null @@ -1,35 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2013 -VisualStudioVersion = 12.0.30723.0 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NLog.Extensions.AzureTableStorage", "NLog.Extensions.AzureTableStorage\NLog.Extensions.AzureTableStorage.csproj", "{69B79032-F3C0-4087-B14E-54E7E91FC4A0}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NLog.Extensions.AzureTableStorage.Tests", "NLog.Extensions.AzureTableStorage.Tests\NLog.Extensions.AzureTableStorage.Tests.csproj", "{FFF58919-9BC6-4FFA-B0B4-2197F468813D}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{576BC019-896A-4287-9399-76FB1DEE0C2C}" - ProjectSection(SolutionItems) = preProject - .nuget\NuGet.Config = .nuget\NuGet.Config - .nuget\NuGet.exe = .nuget\NuGet.exe - .nuget\NuGet.targets = .nuget\NuGet.targets - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {69B79032-F3C0-4087-B14E-54E7E91FC4A0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {69B79032-F3C0-4087-B14E-54E7E91FC4A0}.Debug|Any CPU.Build.0 = Debug|Any CPU - {69B79032-F3C0-4087-B14E-54E7E91FC4A0}.Release|Any CPU.ActiveCfg = Release|Any CPU - {69B79032-F3C0-4087-B14E-54E7E91FC4A0}.Release|Any CPU.Build.0 = Release|Any CPU - {FFF58919-9BC6-4FFA-B0B4-2197F468813D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {FFF58919-9BC6-4FFA-B0B4-2197F468813D}.Debug|Any CPU.Build.0 = Debug|Any CPU - {FFF58919-9BC6-4FFA-B0B4-2197F468813D}.Release|Any CPU.ActiveCfg = Release|Any CPU - {FFF58919-9BC6-4FFA-B0B4-2197F468813D}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/NuGet.Config b/NuGet.Config new file mode 100644 index 0000000..95143bd --- /dev/null +++ b/NuGet.Config @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/README.md b/README.md index dd18a31..3d5b0af 100644 --- a/README.md +++ b/README.md @@ -1,17 +1,26 @@ -NLog Azure Table Storage Target -=============================== +NLog Azure Table Storage Target updated by Greenliff +==================================================== Azure Table Storage Target for NLog For more info about NLog targets and how to use it, refer to How To Write a Target -Download -========== -Download package from Nuget +Original source +=============== +Based on the source available at Github + +Modifications +============= +- Support for ASP.NET 5 Beta8 +- Support for NLog 4.2.1 +- Support for WindowsAzure.Storage 6.1.1-preview +- Note that the latest available package Microsoft.WindowsAzure.ConfigurationManager 3.1.0 does not support DNX Core 5.0 +- app.config has been replaced with appsettings.json, see Startup.cs in project NLog.Extensions.AzureTableStorage.EmptyApplication and AzureTableStorageTargetTests.cs in project NLog.Extensions.AzureTableStorage.Tests How to use ========== -- Download package from Nuget. +- There is currently no Nuget package for download available. Add the project NLog.Extensions.AzureTableStorage to your solution. Add the following dependency to your project.json file: "NLog.Extensions.AzureTableStorage": "" +- Configure your application for logging (appsettings.json, NLog.config, create logger). See sample code in Startup.cs of included project NLog.Extensions.AzureTableStorage.EmptyApplication - If you didn't setup Azure storage connection string yet, follow instructions in Setup a storage connection string. - Open NLog configurations file ex: ```NLog.config``` and add the following lines: - Add ```NLog.Extensions.AzureTableStorage``` assemply to ```extensions``` section: diff --git a/global.json b/global.json new file mode 100644 index 0000000..0c71551 --- /dev/null +++ b/global.json @@ -0,0 +1,6 @@ +{ + "projects": [ "src", "test" ], + "sdk": { + "version": "1.0.0-beta8" + } +} From a48c22fa5e3367d24515c6a296f9c107a0e48dfe Mon Sep 17 00:00:00 2001 From: ihirt Date: Tue, 24 Nov 2015 17:48:48 +0100 Subject: [PATCH 2/4] update project.json files --- NLog.Extensions.AzureTableStorage.EmptyApplication/project.json | 1 + NLog.Extensions.AzureTableStorage.Tests/project.json | 1 - NLog.Extensions.AzureTableStorage/project.json | 1 - 3 files changed, 1 insertion(+), 2 deletions(-) diff --git a/NLog.Extensions.AzureTableStorage.EmptyApplication/project.json b/NLog.Extensions.AzureTableStorage.EmptyApplication/project.json index 61a9477..89d48d7 100644 --- a/NLog.Extensions.AzureTableStorage.EmptyApplication/project.json +++ b/NLog.Extensions.AzureTableStorage.EmptyApplication/project.json @@ -1,5 +1,6 @@ { "version": "1.0.0-*", + "authors": [ "greenliff.com" ], "tooling": { "defaultNamespace": "NLog.Extensions.AzureTableStorage.EmptyApplication" diff --git a/NLog.Extensions.AzureTableStorage.Tests/project.json b/NLog.Extensions.AzureTableStorage.Tests/project.json index 85e82a1..bb7843d 100644 --- a/NLog.Extensions.AzureTableStorage.Tests/project.json +++ b/NLog.Extensions.AzureTableStorage.Tests/project.json @@ -1,7 +1,6 @@ { "version": "1.0.0-*", "description": "NLog.Extensions.AzureTableStorage.Tests Class Library", - "authors": [ "greenliff.com" ], "tags": [ "" ], "projectUrl": "", "licenseUrl": "", diff --git a/NLog.Extensions.AzureTableStorage/project.json b/NLog.Extensions.AzureTableStorage/project.json index 2ab52b1..97d2885 100644 --- a/NLog.Extensions.AzureTableStorage/project.json +++ b/NLog.Extensions.AzureTableStorage/project.json @@ -1,7 +1,6 @@ { "version": "1.0.0-*", "description": "NLog.Extensions.AzureTableStorage Class Library", - "authors": [ "greenliff.com" ], "tags": [ "" ], "projectUrl": "", "licenseUrl": "", From a4033a95ac1d3f9cb779eea4cb9833bfdca59469 Mon Sep 17 00:00:00 2001 From: ihirt Date: Wed, 25 Nov 2015 16:05:50 +0100 Subject: [PATCH 3/4] Remove dependency Microsoft.Extensions.NotNullAttribute.Sources --- NLog.Extensions.AzureTableStorage/project.json | 1 - 1 file changed, 1 deletion(-) diff --git a/NLog.Extensions.AzureTableStorage/project.json b/NLog.Extensions.AzureTableStorage/project.json index 97d2885..dbbee23 100644 --- a/NLog.Extensions.AzureTableStorage/project.json +++ b/NLog.Extensions.AzureTableStorage/project.json @@ -12,7 +12,6 @@ "Microsoft.Framework.Configuration": "1.0.0-beta8", "Microsoft.Framework.Configuration.Json": "1.0.0-beta8", "Microsoft.WindowsAzure.ConfigurationManager": "3.1.0", - "Microsoft.Extensions.NotNullAttribute.Sources": "1.0.0-rc1-15718", "Microsoft.Framework.DependencyInjection": "1.0.0-beta8", "Newtonsoft.Json": "7.0.1", "NLog": "4.2.1", From 7be5300cf0a5e76e3c770528291fdd4228181f10 Mon Sep 17 00:00:00 2001 From: ihirt Date: Fri, 27 Nov 2015 14:57:21 +0100 Subject: [PATCH 4/4] Update from ASP.NET Beta8 to RC1 --- .../Properties/launchSettings.json | 25 +++++++++++++++++++ .../Startup.cs | 9 ++++--- .../project.json | 13 ++++++---- .../AzureTableStorageTargetTests.cs | 2 +- .../project.json | 8 +++--- .../AtsCoreServiceCollectionExtensions.cs | 2 +- .../project.json | 6 ++--- README.md | 2 +- global.json | 2 +- 9 files changed, 49 insertions(+), 20 deletions(-) create mode 100644 NLog.Extensions.AzureTableStorage.EmptyApplication/Properties/launchSettings.json diff --git a/NLog.Extensions.AzureTableStorage.EmptyApplication/Properties/launchSettings.json b/NLog.Extensions.AzureTableStorage.EmptyApplication/Properties/launchSettings.json new file mode 100644 index 0000000..da290f9 --- /dev/null +++ b/NLog.Extensions.AzureTableStorage.EmptyApplication/Properties/launchSettings.json @@ -0,0 +1,25 @@ +{ + "iisSettings": { + "windowsAuthentication": false, + "anonymousAuthentication": true, + "iisExpress": { + "applicationUrl": "http://localhost:56012/", + "sslPort": 0 + } + }, + "profiles": { + "IIS Express": { + "commandName": "IISExpress", + "launchBrowser": true, + "environmentVariables": { + "Hosting:Environment": "Development" + } + }, + "web": { + "commandName": "web", + "environmentVariables": { + "Hosting:Environment": "Development" + } + } + } +} \ No newline at end of file diff --git a/NLog.Extensions.AzureTableStorage.EmptyApplication/Startup.cs b/NLog.Extensions.AzureTableStorage.EmptyApplication/Startup.cs index ce8e849..dd71e1a 100644 --- a/NLog.Extensions.AzureTableStorage.EmptyApplication/Startup.cs +++ b/NLog.Extensions.AzureTableStorage.EmptyApplication/Startup.cs @@ -4,15 +4,16 @@ using Microsoft.AspNet.Hosting; using Microsoft.AspNet.Http; using Microsoft.Dnx.Runtime; -using Microsoft.Framework.Configuration; -using Microsoft.Framework.DependencyInjection; -using Microsoft.Framework.Logging; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Logging; +using Microsoft.Extensions.PlatformAbstractions; namespace NLog.Extensions.AzureTableStorage.EmptyApplication { public class Startup { - private Microsoft.Framework.Logging.ILogger _log; + private Microsoft.Extensions.Logging.ILogger _log; private string logConfigurationFile = string.Empty; public Startup(IHostingEnvironment env, IApplicationEnvironment appEnv) diff --git a/NLog.Extensions.AzureTableStorage.EmptyApplication/project.json b/NLog.Extensions.AzureTableStorage.EmptyApplication/project.json index 89d48d7..b237ada 100644 --- a/NLog.Extensions.AzureTableStorage.EmptyApplication/project.json +++ b/NLog.Extensions.AzureTableStorage.EmptyApplication/project.json @@ -7,15 +7,18 @@ }, "dependencies": { - "Microsoft.AspNet.IISPlatformHandler": "1.0.0-beta8", - "Microsoft.AspNet.Server.Kestrel": "1.0.0-beta8", - "Microsoft.AspNet.Hosting": "1.0.0-beta8", - "Microsoft.Framework.DependencyInjection": "1.0.0-beta8", - "Microsoft.Framework.Logging.NLog": "1.0.0-beta8-*", + "Microsoft.AspNet.IISPlatformHandler": "1.0.0-rc1-final-*", + "Microsoft.AspNet.Server.Kestrel": "1.0.0-rc1-final-*", + "Microsoft.AspNet.Hosting": "1.0.0-rc1-final-*", + "Microsoft.Dnx.Runtime": "1.0.0-rc1-final-*", + "Microsoft.Extensions.DependencyInjection": "1.0.0-rc1-final-*", + "Microsoft.Extensions.Logging.NLog": "1.0.0-rc1-final-*", "NLog.Extensions.AzureTableStorage": "" }, "commands": { + "kestrel": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.Kestrel --server.urls http://*:5004", + "ef": "EntityFramework.Commands", "web": "Microsoft.AspNet.Server.Kestrel" }, diff --git a/NLog.Extensions.AzureTableStorage.Tests/AzureTableStorageTargetTests.cs b/NLog.Extensions.AzureTableStorage.Tests/AzureTableStorageTargetTests.cs index 1fb91dd..27ef59e 100644 --- a/NLog.Extensions.AzureTableStorage.Tests/AzureTableStorageTargetTests.cs +++ b/NLog.Extensions.AzureTableStorage.Tests/AzureTableStorageTargetTests.cs @@ -1,5 +1,5 @@ using Microsoft.Azure; -using Microsoft.Framework.Configuration; +using Microsoft.Extensions.Configuration; using Microsoft.WindowsAzure.Storage; using Microsoft.WindowsAzure.Storage.Table; using System; diff --git a/NLog.Extensions.AzureTableStorage.Tests/project.json b/NLog.Extensions.AzureTableStorage.Tests/project.json index bb7843d..b05d314 100644 --- a/NLog.Extensions.AzureTableStorage.Tests/project.json +++ b/NLog.Extensions.AzureTableStorage.Tests/project.json @@ -6,11 +6,11 @@ "licenseUrl": "", "dependencies": { - "Microsoft.Framework.Configuration": "1.0.0-beta8", - "Microsoft.Framework.OptionsModel": "1.0.0-beta8-*", + "Microsoft.Extensions.Configuration": "1.0.0-rc1-final-*", + "Microsoft.Extensions.OptionsModel": "1.0.0-rc1-final-*", "NLog.Extensions.AzureTableStorage": "", - "xunit": "2.1.0-rc2-build3176", - "xunit.runner.dnx": "2.1.0-beta6-build191" + "xunit": "2.1.0", + "xunit.runner.dnx": "2.1.0-rc1-build204" }, "frameworks": { diff --git a/NLog.Extensions.AzureTableStorage/AtsCoreServiceCollectionExtensions.cs b/NLog.Extensions.AzureTableStorage/AtsCoreServiceCollectionExtensions.cs index a2460cb..a33ec86 100644 --- a/NLog.Extensions.AzureTableStorage/AtsCoreServiceCollectionExtensions.cs +++ b/NLog.Extensions.AzureTableStorage/AtsCoreServiceCollectionExtensions.cs @@ -1,5 +1,5 @@ using System; -using Microsoft.Framework.DependencyInjection; +using Microsoft.Extensions.DependencyInjection; namespace NLog.Extensions.AzureTableStorage { diff --git a/NLog.Extensions.AzureTableStorage/project.json b/NLog.Extensions.AzureTableStorage/project.json index dbbee23..9b9543d 100644 --- a/NLog.Extensions.AzureTableStorage/project.json +++ b/NLog.Extensions.AzureTableStorage/project.json @@ -9,10 +9,10 @@ "Microsoft.Data.Edm": "5.6.2", "Microsoft.Data.OData": "5.6.2", "Microsoft.Data.Services.Client": "5.6.2", - "Microsoft.Framework.Configuration": "1.0.0-beta8", - "Microsoft.Framework.Configuration.Json": "1.0.0-beta8", + "Microsoft.Extensions.Configuration": "1.0.0-rc1-final-*", + "Microsoft.Extensions.Configuration.Json": "1.0.0-rc1-final-*", "Microsoft.WindowsAzure.ConfigurationManager": "3.1.0", - "Microsoft.Framework.DependencyInjection": "1.0.0-beta8", + "Microsoft.Extensions.DependencyInjection": "1.0.0-rc1-final-*", "Newtonsoft.Json": "7.0.1", "NLog": "4.2.1", "System.Spatial": "5.6.2", diff --git a/README.md b/README.md index 3d5b0af..095063c 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ Based on the source available at