2

Currently I'm logging in blob storage by creating a List of string that i want to log and when the number of strings in the list crosses a number convert the list to a byte array and calling CloudBlockBlob.UploadFromStream..

I have recently come to know that I can also write to the blob directly one line at a time without creating the list of log-lines here.The article shows 'await destinationStream.WriteAsync'.

I would sincerely appreciate if someone could guide me as to how to shift towards this style..

I found a similar question asked a couple of years back but no answers to the same as well..

Thanks

2 Answers 2

1

Is there a reason you are rolling your own logging instead of using Azure Diagnostics? You can post unique messages to the diagnostics log azure table

Guid To Starting Azure Diagnostics

Sign up to request clarification or add additional context in comments.

1 Comment

These logs are not diagnostic logs .. but analytics logs for use in HDInsight
0

You can output the standard Trace to the WADLogsTable with the following:

<system.diagnostics>
    <trace autoflush="false" indentsize="4" xdt:Transform="Insert">
        <listeners>
            <add name="AzureDiagnostics" type="Microsoft.WindowsAzure.Diagnostics.DiagnosticMonitorTraceListener, Microsoft.WindowsAzure.Diagnostics, Version=2.4.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
        </listeners>
    </trace>
</system.diagnostics>

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.