Git Product home page Git Product logo

log4net.azure's Introduction

Stories in Ready #log4net.Azure

Transfer all your logs to the Azure Table or Blob Storage via Appender for log4Net

Install

Add To project via NuGet:

  1. Right click on a project and click 'Manage NuGet Packages'.
  2. Search for 'log4net.Appender.Azure' and click 'Install'.

Configuration

Table Storage

Every log entry is stored in a separate row.

<appender name="AzureTableAppender" type="log4net.Appender.AzureTableAppender, log4net.Appender.Azure">
   <param name="TableName" value="testLoggingTable"/>
   <!-- You can either specify a connection string or use the ConnectionStringName property instead -->
   <param name="ConnectionString" value="UseDevelopmentStorage=true"/>
   <!--<param name="ConnectionStringName" value="GlobalConfigurationString" />-->
   <!-- You can specify this to make each LogProperty as separate Column in TableStorage, 
	Default: all Custom Properties were logged into one single field -->
   <param name="PropAsColumn" value="true" />
   <param name="PartitionKeyType" value="LoggerName" />
 </appender>
  • TableName:
    Name of the table in Table Storage
  • ConnectionString:
    the full Azure Storage connection string
  • ConnectionStringName:
    Name of a connection string specified under connectionString
  • PropAsColumn(optional):
    Default: all properties were written in a single field(default).
    If you specifiy this with the value true then each custom log4net property is logged as separate column/field in the table.
    Remember that Table storage has a Limit of 255 Properties (see here).
  • PartitionKeyType(optional):
    Default "LoggerName": (each logger gets his own partition in Table Storage)
    "DateReverse": order by Date Reverse to see the latest items first (How to order elements by date reverse)

BlobStorage

Every log Entry is stored as separate XML file.

<appender name="AzureBlobAppender" type="log4net.Appender.AzureBlobAppender, log4net.Appender.Azure">
  <param name="ContainerName" value="testloggingblob"/>
  <param name="DirectoryName" value="logs"/>
  <!-- You can either specify a connection string or use the ConnectionStringName property instead -->
  <param name="ConnectionString" value="UseDevelopmentStorage=true"/>
  <!--<param name="ConnectionStringName" value="GlobalConfigurationString" />-->
</appender>
  • ContainerName:
    Name of the container in Blob Storage
  • DirectoryName:
    Name of the folder in the specified container
  • ConnectionString:
    the full Azure Storage connection string
  • ConnectionStringName:
    Name of a connection string specified under connectionString

AppendBlobStorage

Every log Entry is stored as separate XML file.

<appender name="AzureAppendBlobAppender" type="log4net.Appender.AzureAppendBlobAppender, log4net.Appender.Azure">
  <param name="ContainerName" value="testloggingblob"/>
  <param name="DirectoryName" value="logs"/>
  <!-- You can either specify a connection string or use the ConnectionStringName property instead -->
  <param name="ConnectionString" value="UseDevelopmentStorage=true"/>
  <!--<param name="ConnectionStringName" value="GlobalConfigurationString" />-->
</appender>
  • ContainerName:
    Name of the container in Blob Storage
  • DirectoryName:
    Name of the folder in the specified container
  • ConnectionString:
    the full Azure Storage connection string
  • ConnectionStringName:
    Name of a connection string specified under connectionString

View Logs

You can take a look on this Site to use one of this tools based on your selected appender.

log4net.azure's People

Contributors

jorupp avatar jpierson avatar markames avatar matt-lethargic avatar mattiasnordqvist avatar mryderie avatar stemarie avatar thumann avatar waffle-iron avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

log4net.azure's Issues

Dinamyc Azure Table Name

Provide a mechanism to set table name for each web request or thread.

I have a multitenant webapp, and it will be nice to have logs for each tenant in different tables so it get easy to lookup.

Use UTC for RowKey and PartitionKey (in DateReverse mode)

I think it would be better if the RowKey and PartitionKey (in DateReverse mode) had been generated from UTC rather than from local time.

If you like the feature, I can probably do it myself and create a PR.

Thanks for a great utility, I really needed this one when I found it!

couldn't create a log file using AzureAppendBlobAppender

I use a web.config contain the log4net configuration.
but I check the blob container, and it has nothing yet.
I was searching the idea for a long time as a beginner.
and I don't know why.

web.config

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  
  <configSections>
    <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" />
  </configSections>

  <appSettings>
    <add key="log4net.Config" value="log4net.Config" />
    <add key="log4net.Config.watch" value="true" />
    <add key="log4net.Internal.Debug" value="true" />
  </appSettings>

  <system.diagnostics>
    <trace autoflush="true">
      <listeners>
        <add
            name="TextWriterTraceListener"
            type="System.Diagnostics.TextWriterTraceListener"
            initializeData="D:\srcCSharp\SampleApp\WebApplicationTest\logs\log4net.txt" />
      </listeners>
    </trace>
  </system.diagnostics>
  
  <log4net>

  
    <!-- Azure AppendBlob Appender, uncomment, set proper BucketName and AWS credentials (appSettings) to try it out -->
    <appender name="BlobAppender" type="log4net.Appender.AzureAppendBlobAppender, log4net.Appender.Azure">
      <!-- You can either specify a connection string or use the ConnectionStringName property instead -->
      <param name="ConnectionString" value="UseDevelopmentStorage=true" />
      <param name="ConnectionString" value="DefaultEndpointsProtocol=https;AccountName=logstorage;AccountKey=3r90Axf+UO;EndpointSuffix=core.windows.net" />
      <param name="ContainerName" value="logs" />
      <param name="DirectoryName" value="%date{yyyyMM}" />
      <!--<param name="ConnectionStringName" value="GlobalConfigurationString" />-->
      <layout type="log4net.Layout.PatternLayout">
        <conversionPattern value="Log At %date{yyyy/MM/dd HH:mm:ss, fff} [%thread] %-5level %logger  - %message%newline" />
      </layout>
    </appender>

    <appender name="ConsoleAppender" type="log4net.Appender.ConsoleAppender">
      <layout type="log4net.Layout.PatternLayout">
        <conversionPattern value="Log At %date{yyyy/MM/dd HH:mm:ss,fff} [%thread][%-5level]%logger  - %message%newline" />
      </layout>
    </appender>

    <root>
      <level value="ALL" />
      <appender-ref ref="BlobAppender" />
      <appender-ref ref="ConsoleAppender" />
    </root>
  </log4net>

  <connectionStrings>
    <!-- Provided as an example for specifying a global connection string for multiple appenders -->
    <add name="GlobalConfigurationString" connectionString="UseDevelopmentStorage=true" />
  </connectionStrings>
  
  <startup>
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
  </startup>
  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="Microsoft.Data.Edm" publicKeyToken="31bf3856ad364e35" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-5.6.0.0" newVersion="5.6.0.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="Microsoft.Data.Services.Client" publicKeyToken="31bf3856ad364e35" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-5.6.0.0" newVersion="5.6.0.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="Microsoft.Data.OData" publicKeyToken="31bf3856ad364e35" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-5.6.0.0" newVersion="5.6.0.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-7.0.0.0" newVersion="7.0.0.0" />
      </dependentAssembly>
    </assemblyBinding>
  </runtime>

</configuration>

Startup.cs

// public void Configure(IApplicationBuilder app, IHostingEnvironment env) 
XmlDocument XmlDoc = new XmlDocument();
string configFile = "web.config";
XmlDoc.Load(File.OpenRead(configFile));
var repo = log4net.LogManager.CreateRepository(Assembly.GetEntryAssembly(), typeof(log4net.Repository.Hierarchy.Hierarchy));
XmlNodeList elemList = XmlDoc.GetElementsByTagName("log4net");
log4net.Config.XmlConfigurator.Configure(repo, (XmlElement)elemList[0]);

ILog Logger = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
if(Logger.IsDebugEnabled)
{
    Logger.Debug(" ---- All is well !");
}

As the ConsoleAppender is working well , the BlobAppender works nothing .
My Azure Storage Explorer has no file created.
Are there Any ideas for me .
@matt-lethargic
@dstj
@stemarie
@mryderie
@Thumann

Dynamic Directory name

Is there any plan to add DirectoryName for Azure Blob Appender in the near future?
It would be really helpful if the DirectoryName could be specified as a date format from the configuration file.

Something like yyyy-MM-dd, so that we end up with one folder per day.

Thanks for the great work 👍

No license set for the project

There is no license set for this project's source code. There is not tons of code, and it's relatively straight forward, but could you please set a license to avoid any ambiguity. I suggest MIT or Apache2

logging doesn't work in mvc

I'm trying to use azure table logging an MVC app and the logs aren't being sent to azure. I have a textappender and consoleappender that work fine.

Suggest introducing RollingTableAppender

Table storage is a pain to delete row from so it would be a good idea to roll the table name that is written to like the RollingFileAppender.

I'd suggest just supporting daily/weekly/monthly rolling as that provides enough granularity to work out the wipe/archival strategy you might want for logs

Don't mind having a go writing it, just let me know if anyone else has any requirements before I start

When built in Release mode

Hi,

When the project is built in debug mode the logging works fine. However when deployed in release mode it doesn't log. Even on the dev machine doesn't log when mode is release.

Do you have any ideas why is that ?

Thanks

Doesn't work.

I have installed the package. The appender creates the logging table, but never actually writes anything to it. Below is the setup for confirmation:

<log4net> <appender name="AzureTableAppender" type="log4net.Appender.AzureTableAppender, log4net.Appender.Azure"> <param name="TableName" value="MobileLog"/> <param name="ConnectionStringName" value="Azure_Logging" /> <!-- You can specify this to make each LogProperty as separate Column in TableStorage, Default: all Custom Properties were logged into one single field --> <param name="PropAsColumn" value="true" /> <param name="PartitionKeyType" value="LoggerName" /> </appender> <root> <level value="INFO" /> <appender-ref ref="AzureTableAppender" /> </root> </log4net>

ConnectionStringName doesn't work while using ConnectionString is ok

when i use ConnectionStringName like below, it doesn't work
<connectionStrings>
<add name="Log4Net.WindowsAzureStorage.ConnectionString" connectionString=****" />
</connectionStrings>

`
...

... `

but if i use the ConnectionString directly like below, it works, why? is it because a lack of ? but i don't know how to write the ...
`
...

... `

Allow specifying a list of columns to log

I suggest introducing a property Columns which can be used to specify what to log to Azure. Eg.

<param name="Columns" value="Level,Message,EventTimeStamp,ThreadName,MyProperty" />

If you like the feature, I can probably do it myself and create a PR.

Method not found: CreateIfNotExists

The exception happened 🥇

System.MissingMethodException: Method not found: 'Boolean Microsoft.WindowsAzure.Storage.Blob.CloudBlobContainer.CreateIfNotExists(Microsoft.WindowsAzure.Storage.Blob.BlobRequestOptions, Microsoft.WindowsAzure.Storage.OperationContext)'.
at log4net.Appender.AzureAppendBlobAppender.ActivateOptions()
at log4net.Repository.Hierarchy.XmlHierarchyConfigurator.ParseAppender(XmlElement appenderElement)
log4net:ERROR Appender named [BlobAppender] not found.

My env happened the issue by using log4net.Appender.Azure.
I named my appender with [BlobAppender] on the type of AzureAppendBlobAppender.
I spended one and a half day trying to sovle it as a beginner.
Finally I change the CreateIfNotExists() method to CreateIfNotExistsAsync(), and it solved.

before:------------------------
_cloudBlobContainer.CreateIfNotExists();
after:--------------------------
_cloudBlobContainer.CreateIfNotExistsAsync();

Just for share~

.NET Standard support?

Thank you for this great appender. Will there be a .NET Standard version soon?

It is a pity that this appender cannot be used in .NET Core, otherwise I can run a Linux service on Azure and then also log to Azure instead to files.

Assemblies not signed (does not have a strong name)

I am getting the following warning from MSBuild:

CSC: Referenced assembly 'log4net.Appender.Azure, Version=1.2.1.23255, Culture=neutral, PublicKeyToken=null' does not have a strong name.

This is apparently because the assembly is not signed.

RowKey

Any suggestions on how to effectively query using Row key(ticks+guid) ?

Is there a way to log into blob storage in a text file instead of xml? And can I append to it ?

I'm using the following for now :

    <appender name="AzureBlobAppender" type="log4net.Appender.AzureBlobAppender, log4net.Appender.Azure">
      <param name="ContainerName" value="testblobcontainer" />
      <param name="DirectoryName" value="logs/" />
      <!-- You can either specify a connection string or use the ConnectionStringName property instead -->
      <param name="ConnectionString" value="UseDevelopmentStorage=true;" />
      <!--<param name="ConnectionStringName" value="GlobalConfigurationString" />-->
      <bufferSize value="5" />
    </appender>

But as expected I'm ending up with MANY xml files. So my question is, can I log into 1 text file? If not, can I at least end up with 1 xml file instead of 1 for each log message?

PS: I tried using the following but didnt work

<appender name="AzureAppendBlobAppender" type="log4net.Appender.AzureAppendBlobAppender, log4net.Appender.Azure">
  <param name="ContainerName" value="testblobcontainer"/>
  <param name="DirectoryName" value="logs"/>
  <!-- You can either specify a connection string or use the ConnectionStringName property instead -->
  <param name="ConnectionString" value="UseDevelopmentStorage=true"/>
  <!--<param name="ConnectionStringName" value="GlobalConfigurationString" />-->
  <bufferSize value="5" />
</appender>

log4net.Appender.Azure.csproj is broken XML

Somehow, the .csproj contains the following xml:

<Reference Include="Microsoft.WindowsAzure.Configuration">
  <Reference Include="Microsoft.Data.Services.Client">
    <HintPath>..\packages\Microsoft.Data.Services.Client.5.6.4\lib\net40\Microsoft.Data.Services.Client.dll</HintPath> 
    <Private>True</Private>
  </Reference>

The <Reference ... WIndowsAzure.Configuration is never closed. Later on, the entry is correctly repeated, but the XML is already broken.

Problem when using appender with asp.net mvc 5

Hi,

I have a issue when i use the library with asp.net mvc 5. Only the RollingLogFileAppender is known. The appenders using your library is not known! With a console application, that's work!

I publish my code sample application using asp.net mvc and the log4net appender using it with azure storage.
https://github.com/jducobu/log4net.Appender.Azure-test/tree/master

issue

When i debug the code of the library, i have an http exception 400 - The remote server returned an error: (400) Bad Request trying to execute CreateIfNotExists method with a status ProtocoError

issue

Do you have have an idea ?

Jérôme

Continue Development

Hi @stemarie,

On this Repo there are some issues with possible solutions so can you continue with integrate or discussing the solutions?
If no, can you add another contributor to continue Developing and integrating Features? And updating the Nuget Packages.

I can take this role, but if anyone else want to do this so they are welcome and just add a comment to this issue.

Thanks Erik

Error 200 Bad Request - InvalidResourceName attempting to use AzureTableAppender

I'm new to Azure table storage so I'm guessing that this issue is just due to something I'm missing on my end. I've set up a new general Resource Manager storage account with otherwise typical configuration. I've formulated my connection string as so.

<appender name="AzureTableAppender" type="log4net.Appender.AzureTableAppender, log4net.Appender.Azure">
  <param name="TableName" value="MY_TABLE"/>
  <param name="ConnectionString" value="DefaultEndpointsProtocol=https;AccountName=AccountName;AccountKey=MYKEY;"/>
  <param name="PropAsColumn" value="true" />
  <param name="PartitionKeyType" value="LoggerName" />
</appender>

But when logging using AzureTableAppender I can see entries logged to the other appenders but nothing shows up in my storage account tables but I found the following in my Debug Output window in Visual Studio.

log4net:ERROR Could not create Appender [AzureTableAppender] of type [log4net.Appender.AzureTableAppender, log4net.Appender.Azure]. Reported error follows.
Microsoft.WindowsAzure.Storage.StorageException: The remote server returned an error: (400) Bad Request. ---> System.Net.WebException: The remote server returned an error: (400) Bad Request.
   at System.Net.HttpWebRequest.GetResponse()
   at Microsoft.WindowsAzure.Storage.Core.Executor.Executor.ExecuteSync[T](RESTCommand`1 cmd, IRetryPolicy policy, OperationContext operationContext) in c:\Program Files (x86)\Jenkins\workspace\release_dotnet_master\Lib\ClassLibraryCommon\Core\Executor\Executor.cs:line 677
   --- End of inner exception stack trace ---
   at Microsoft.WindowsAzure.Storage.Core.Executor.Executor.ExecuteSync[T](RESTCommand`1 cmd, IRetryPolicy policy, OperationContext operationContext) in c:\Program Files (x86)\Jenkins\workspace\release_dotnet_master\Lib\ClassLibraryCommon\Core\Executor\Executor.cs:line 604
   at Microsoft.WindowsAzure.Storage.Table.TableOperation.Execute(CloudTableClient client, CloudTable table, TableRequestOptions requestOptions, OperationContext operationContext) in c:\Program Files (x86)\Jenkins\workspace\release_dotnet_master\Lib\ClassLibraryCommon\Table\TableOperation.cs:line 41
   at Microsoft.WindowsAzure.Storage.Table.CloudTable.Create(TableRequestOptions requestOptions, OperationContext operationContext) in c:\Program Files (x86)\Jenkins\workspace\release_dotnet_master\Lib\ClassLibraryCommon\Table\CloudTable.cs:line 910
   at Microsoft.WindowsAzure.Storage.Table.CloudTable.CreateIfNotExists(TableRequestOptions requestOptions, OperationContext operationContext) in c:\Program Files (x86)\Jenkins\workspace\release_dotnet_master\Lib\ClassLibraryCommon\Table\CloudTable.cs:line 1051
   at log4net.Appender.AzureTableAppender.ActivateOptions()
   at log4net.Repository.Hierarchy.XmlHierarchyConfigurator.ParseAppender(XmlElement appenderElement)
Request Information
RequestID:ba55bf8d-0002-00b3-427c-8cbb4d000000
RequestDate:Tue, 21 Feb 2017 19:58:41 GMT
StatusMessage:Bad Request
ErrorCode:InvalidResourceName

log4net:ERROR Appender named [AzureTableAppender] not found.

Am I missing something? Do I have to create some sort of table name or a schema ahead of time?

PartitionKey

Hi,

can you explain why you have used the LoggerName Property as PartitionKey?
most of the Logging examples always use a combination of year month day ...
And for Scaling in a table this make more sence or am I wrong?

regards,
Erik

AzureTableAppender: Property name

I was trying to use the table appender, but looks like it fails because the AzureLoggingEventEntity has a property called "Properties". Very weird, but I am able to consistently repro the issue.
Steps:
Just ensure some value is being set to the Properties property. If no value is set, issue doesn't repro. I changed the property name from Properties to PropertiesDictionary and everything works fine!

Remove Dependency on Microsoft.WindowsAzure.Configuration

Our azure website is generating warnings on start up "Role environment . FAILED TO INITIALIZE. hr: -2147024891" which are traced down to dependency on WindowsAzure.Configuration assembly.

for more info check:
http://stackoverflow.com/questions/35495505/azure-websites-complaining-role-environment-failed-to-initialize-on-startup

Azure cloud services, roles are basically deprecated.

consider getting rid of this block code in Util.cs

 // Fallback to CloudConfigurationManager in case we're running as a worker/web role
            var azConfig = CloudConfigurationManager.GetSetting(connectionStringName);
            if (!string.IsNullOrWhiteSpace(azConfig))
            {
                return azConfig;
            }

Make it possible to log asynchronously

I think it would be a nice feature if it were possible to specify that the actual should take place on a background thread.

If you like the feature, I can probably do it myself and create a PR.

Getting "BlockCountExceedsLimit" exception while using log4net.Appender.AzureAppendBlobAppender

Hi @stemarie ,

I'm using log4net.Appender.AzureAppendBlobAppender to log my web app's info & errors. Sometimes I'm getting the "BlockCountExceedsLimit" exception. It is due to the append blob accepts only 50,000 block commits after that it through the exception (Conflict (409)). I have checked the code and found that it waits for the 512 log events and flush each log entry separately to the append blob. So, we can log only 50,000 log entries in a day.

Do you have any solution for this? Can we flush the 512 log entries in a single flush?

Thanks,
Karthik

AzureTableAppender

How can i "commit/flush" an entry immediately after logging it ?

Kind regrads
Markus

Logging to Azure with a stored access policy?

I've been experimenting with this project, and rather than provide one of the default keys for the storage account as the connection string, I'd like to provide one with limited permissions. Specifically, I'd like to use a connection string that only allows for access to the specific container where the blob appender will be storing logs.

I can create a connection string from a stored access policy that I create that just provides the required permissions for my target container, but ActivateOptions in the AzureBlobAppender throws an exception due to a 403 returned by the remote service. The problem is due to the call to CreateIfNotExists, which cannot be performed without the ability to create containers.

I don't think that providing the ability to create containers should be necessary for logging into one. Would you consider either removing this call or wrapping it in a try/catch, to prevent failure when this permission is not available?

Read storage connection string from Configuration

When deploying on Azure, it often makes sense not to put storage connection strings into source code. It is possible to configure them as part of the portal service configuration.
They can then be access via ConfigurationManager.ConnectionStrings.

The following patch allows to use

<appender name="AzureTableAppender" ....>
  <param name="ConnectionStringName" value="XXX" />

when configuring AzureTableAppender, and use the same connection definition XXX that is used in other places in the code, anyway.

--- a/log4net.Azure/AzureTableAppender.cs
+++ b/log4net.Azure/AzureTableAppender.cs
@@ -1,4 +1,5 @@
 using System;
+using System.Configuration;
 using System.Linq;
 using log4net.Appender.Extensions;
 using log4net.Appender.Language;
@@ -14,12 +15,19 @@ public class AzureTableAppender : BufferingAppenderSkeleton
         private CloudTableClient _client;
         private CloudTable _table;

+        public string ConnectionStringName { get; set; }
         private string _connectionString;

         public string ConnectionString
         {
             get
             {
+                if (!string.IsNullOrWhiteSpace(ConnectionStringName))
+                {
+                    var config = ConfigurationManager.ConnectionStrings[ConnectionStringName];
+                    if (config != null)
+                        return config.ConnectionString;
+                }
                 if (String.IsNullOrEmpty(_connectionString))
                     throw new ApplicationException(Resources.AzureConnectionStringNotSpecified);
                 return _connectionString;

Azure table appender error

Hi,

I'm trying to use the Azure Table storage appender but nothing gets added.
I've added

<add key="log4net.Internal.Debug" value="true"/>

and

<system.diagnostics>
    <trace>
     <listeners>
  <add
       name="textWriterTraceListener"
       type="System.Diagnostics.TextWriterTraceListener"
       initializeData="C:\dev\log4net.txt" />
       </listeners>
    </trace>
  </system.diagnostics>

and the error that I'm getting is this one

log4net:ERROR Could not create Appender [AzureTableAppender] of type [log4net.Appender.AzureTableAppender, log4net.Appender.Azure]. Reported error follows.
Microsoft.WindowsAzure.Storage.StorageException: The remote server returned an error: (501) Not Implemented. ---> System.Net.WebException: The remote server returned an error: (501) Not Implemented.

Any ideas ?

Thanks

Duplicate UserName & Identity Columns

When using the PropAsColumn setting with the Table Storage appended I am seeing duplicate columns: there is a column for Identity & log4net_Identity both containing the same values, UserName & log4net_UserName also contain the same values.

AzureDynamicLoggingEventEntity is writing all avaialble members of the LoggingEvent along with any items in the Propertes collection which contains the duplicate values.

Logging to Date Specific Azure Table and defer activateOPtions until Connection string is set

I'm using the appender in our projects. As log tables can get very large we would like to create a daily log table, e.g. AzureTable20170113, AzureTable20170114...
We could then delete old logs by droping the table, which is faster then deleting individual rows.

My understanding is that this can be accomplished by using extending the classes, but it would be great to have a property which will handle it natively, [TableNamePattern] = "AzureTable%date{yyyyMMdd}".

In our situation, the connection string needs to be injected from external resources (Azure DocumentDB, App Configuration Settings, Azure KeyVault). The idea is to remove AccountKeys from the source code.
Our first idea was to not provide the Connection string in the config and to call ActiveOptions() only if there is a connection string.

We created our own classes, but would prefer a native solution. Let me know if I can provide samples

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.