Write Enterprise library exception logs to Azure Blob with date time stamp

Occasional Visitor

Hi Team,


We have an Asp.Net web API 2.0 application enabled with Enterprise Library exception handling. As we are hosting the application in Azure App service plan, we need to find a mechanism to store log files in Azure platform ( Azure Blob with date time stamp)


As there are multiple .cs files with try catch exception blocks implemented, is there a way, where we can map the  "Rolling Flat File Trace Listener" log file path to Azure Blob  to collect logs with every day time stamp.


<add name="Rolling Flat File Trace Listener" type="Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.RollingFlatFileTraceListener, Microsoft.Practices.EnterpriseLibrary.Logging, Version=, Culture=neutral, PublicKeyToken=" listenerDataType="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.RollingFlatFileTraceListenerData, Microsoft.Practices.EnterpriseLibrary.Logging, Version=, Culture=neutral, PublicKeyToken=" footer="-[END]---------------------------------------" formatter="Text Formatter" header="-[START]---------------------------------------" rollFileExistsBehavior="Increment" rollInterval="Day" rollSizeKB="300" timeStampPattern="dd-MM-yyyy" fileName="Logs\fileName.log" />


Please suggest other possible way with minimal code changes to existing exception handling mechanism.






0 Replies