Azure Cloud Service (Classic) - Any way to log Diagnostic.Trace logs to BLOB storagePerformance impact of writing Azure diagnostic logs to blob storageCan I use AzureTableTraceListener or AzureBlobTraceListener on a VM?Blob Storage Azure Mobile Services + Swift SetupWhy can't configure Azure diagnostics to use Azure Table Storage via new Azure Portal?Blob storage access from Azure App ServiceHow to store Azure app services diagnostic logs to Azure Table Storage?Azure WebApp Not Sending Application Logs to Blob StorageTrace output to Azure table storagePerformance impact of writing Azure diagnostic logs to blob storageAzure web app (nodejs) logs don't appear in blob storage but webjob logs doHow to deploy an cspkg stored in Azure storage to Azure cloud services (classic)?What is Azure Cloud Service?

Group riding etiquette

Is it unusual for a math department not to have a mail/web server?

Did ancient peoples ever hide their treasure behind puzzles?

Why can't I identify major and minor chords?

Why did Starhopper's exhaust plume become brighter just before landing?

Cutting numbers into a specific decimals

Why does AM radio react to IR remote?

Number of Fingers for a Math Oriented Race

Find feasible point in polynomial time in linear programming

What ways are there to "PEEK" memory sections in (different) BASIC(s)

Spicing up a moment of peace

If the UK Gov. has authority to cancel article 50 notification, why do they have to agree an extension with the EU

Does Mirrorwing Dragon's ability trigger when redirects are involved?

Heat output from a 200W electric radiator?

Pen test results for web application include a file from a forbidden directory that is not even used or referenced

Is allowing Barbarian features to work with Dex-based attacks imbalancing?

What is Soda Fountain Etiquette?

How could a self contained organic body propel itself in space

What's the point of fighting monsters in Zelda BotW?

Why nature prefers simultaneous events?

STM32 cannot reach individual registers and pins as PIC

Why doesn't Starship have four landing legs?

What is the name of this plot that has rows with two connected dots?

Should I ask for a raise one month before the end of an internship?



Azure Cloud Service (Classic) - Any way to log Diagnostic.Trace logs to BLOB storage


Performance impact of writing Azure diagnostic logs to blob storageCan I use AzureTableTraceListener or AzureBlobTraceListener on a VM?Blob Storage Azure Mobile Services + Swift SetupWhy can't configure Azure diagnostics to use Azure Table Storage via new Azure Portal?Blob storage access from Azure App ServiceHow to store Azure app services diagnostic logs to Azure Table Storage?Azure WebApp Not Sending Application Logs to Blob StorageTrace output to Azure table storagePerformance impact of writing Azure diagnostic logs to blob storageAzure web app (nodejs) logs don't appear in blob storage but webjob logs doHow to deploy an cspkg stored in Azure storage to Azure cloud services (classic)?What is Azure Cloud Service?






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








1















I've been asked to change an old Azure Cloud Service worker's logging to the System.Diagnostics.Trace logging style of logging. I've done that and now I'm about ready to deploy it to azure.



The client requirement is that these logs should appear in blob storage, similar to how the more modern app service logs can be configured to write their diagnostics to blob storage. There is an expectation that logs can be batched up and uploaded periodically (perhaps time or number of lines based).



Is there a nuget package or other library or config I should enable to connect the application to blob storage? I've spent about 20 mins searching here and online for a solution, but information seems to mainly talk about writing logs to Table Storage..



Edit: More detail:



  • This is an existing app (C# .Net Framework 4.5) that used to use an external logging service.

  • I assumed (incorrectly, I think) that the logging to blob storage was something I could configure in the Azure Portal.

  • As things are right now, NO log file of any kind is generated, but when I run the code in Visual Studio, I can see some Output from the logging statements

  • I have updated the code to use a standard (custom) logging system
    that eventually boils down to using statements like the below:

Trace.TraceInformation($"DEBUG: message");



Here are some links I found with related information:



Streaming from command line



Trace listener question



Adding Trace to existing website



Performance Impact of Logging



Smarx Library










share|improve this question


























  • Can you provide more details, have actually developed the app that changes how the logs look like ? if so, Does it generate a log file locally for now ? These would provide us with a good scope to help you with a solution.

    – Adam Smith-MSFT
    Mar 27 at 22:00






  • 1





    Sure, I'll update the question..

    – user230910
    Mar 27 at 22:05











  • Done, hope I've addressed the questions :)

    – user230910
    Mar 27 at 22:10

















1















I've been asked to change an old Azure Cloud Service worker's logging to the System.Diagnostics.Trace logging style of logging. I've done that and now I'm about ready to deploy it to azure.



The client requirement is that these logs should appear in blob storage, similar to how the more modern app service logs can be configured to write their diagnostics to blob storage. There is an expectation that logs can be batched up and uploaded periodically (perhaps time or number of lines based).



Is there a nuget package or other library or config I should enable to connect the application to blob storage? I've spent about 20 mins searching here and online for a solution, but information seems to mainly talk about writing logs to Table Storage..



Edit: More detail:



  • This is an existing app (C# .Net Framework 4.5) that used to use an external logging service.

  • I assumed (incorrectly, I think) that the logging to blob storage was something I could configure in the Azure Portal.

  • As things are right now, NO log file of any kind is generated, but when I run the code in Visual Studio, I can see some Output from the logging statements

  • I have updated the code to use a standard (custom) logging system
    that eventually boils down to using statements like the below:

Trace.TraceInformation($"DEBUG: message");



Here are some links I found with related information:



Streaming from command line



Trace listener question



Adding Trace to existing website



Performance Impact of Logging



Smarx Library










share|improve this question


























  • Can you provide more details, have actually developed the app that changes how the logs look like ? if so, Does it generate a log file locally for now ? These would provide us with a good scope to help you with a solution.

    – Adam Smith-MSFT
    Mar 27 at 22:00






  • 1





    Sure, I'll update the question..

    – user230910
    Mar 27 at 22:05











  • Done, hope I've addressed the questions :)

    – user230910
    Mar 27 at 22:10













1












1








1








I've been asked to change an old Azure Cloud Service worker's logging to the System.Diagnostics.Trace logging style of logging. I've done that and now I'm about ready to deploy it to azure.



The client requirement is that these logs should appear in blob storage, similar to how the more modern app service logs can be configured to write their diagnostics to blob storage. There is an expectation that logs can be batched up and uploaded periodically (perhaps time or number of lines based).



Is there a nuget package or other library or config I should enable to connect the application to blob storage? I've spent about 20 mins searching here and online for a solution, but information seems to mainly talk about writing logs to Table Storage..



Edit: More detail:



  • This is an existing app (C# .Net Framework 4.5) that used to use an external logging service.

  • I assumed (incorrectly, I think) that the logging to blob storage was something I could configure in the Azure Portal.

  • As things are right now, NO log file of any kind is generated, but when I run the code in Visual Studio, I can see some Output from the logging statements

  • I have updated the code to use a standard (custom) logging system
    that eventually boils down to using statements like the below:

Trace.TraceInformation($"DEBUG: message");



Here are some links I found with related information:



Streaming from command line



Trace listener question



Adding Trace to existing website



Performance Impact of Logging



Smarx Library










share|improve this question
















I've been asked to change an old Azure Cloud Service worker's logging to the System.Diagnostics.Trace logging style of logging. I've done that and now I'm about ready to deploy it to azure.



The client requirement is that these logs should appear in blob storage, similar to how the more modern app service logs can be configured to write their diagnostics to blob storage. There is an expectation that logs can be batched up and uploaded periodically (perhaps time or number of lines based).



Is there a nuget package or other library or config I should enable to connect the application to blob storage? I've spent about 20 mins searching here and online for a solution, but information seems to mainly talk about writing logs to Table Storage..



Edit: More detail:



  • This is an existing app (C# .Net Framework 4.5) that used to use an external logging service.

  • I assumed (incorrectly, I think) that the logging to blob storage was something I could configure in the Azure Portal.

  • As things are right now, NO log file of any kind is generated, but when I run the code in Visual Studio, I can see some Output from the logging statements

  • I have updated the code to use a standard (custom) logging system
    that eventually boils down to using statements like the below:

Trace.TraceInformation($"DEBUG: message");



Here are some links I found with related information:



Streaming from command line



Trace listener question



Adding Trace to existing website



Performance Impact of Logging



Smarx Library







azure logging azure-storage-blobs trace azure-cloud-services






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 27 at 22:33







user230910

















asked Mar 27 at 21:16









user230910user230910

1,0831 gold badge15 silver badges39 bronze badges




1,0831 gold badge15 silver badges39 bronze badges















  • Can you provide more details, have actually developed the app that changes how the logs look like ? if so, Does it generate a log file locally for now ? These would provide us with a good scope to help you with a solution.

    – Adam Smith-MSFT
    Mar 27 at 22:00






  • 1





    Sure, I'll update the question..

    – user230910
    Mar 27 at 22:05











  • Done, hope I've addressed the questions :)

    – user230910
    Mar 27 at 22:10

















  • Can you provide more details, have actually developed the app that changes how the logs look like ? if so, Does it generate a log file locally for now ? These would provide us with a good scope to help you with a solution.

    – Adam Smith-MSFT
    Mar 27 at 22:00






  • 1





    Sure, I'll update the question..

    – user230910
    Mar 27 at 22:05











  • Done, hope I've addressed the questions :)

    – user230910
    Mar 27 at 22:10
















Can you provide more details, have actually developed the app that changes how the logs look like ? if so, Does it generate a log file locally for now ? These would provide us with a good scope to help you with a solution.

– Adam Smith-MSFT
Mar 27 at 22:00





Can you provide more details, have actually developed the app that changes how the logs look like ? if so, Does it generate a log file locally for now ? These would provide us with a good scope to help you with a solution.

– Adam Smith-MSFT
Mar 27 at 22:00




1




1





Sure, I'll update the question..

– user230910
Mar 27 at 22:05





Sure, I'll update the question..

– user230910
Mar 27 at 22:05













Done, hope I've addressed the questions :)

– user230910
Mar 27 at 22:10





Done, hope I've addressed the questions :)

– user230910
Mar 27 at 22:10












2 Answers
2






active

oldest

votes


















1















The logging is configured by the diagnostics.wadcfgx file which you can see in your solution.



enter image description here



This holds all of the diagnostic information that you want to collect. This can be controlled via the "Properties" of the WebWorker role (right-click -> Properties).



From there, there is also the option to specify the Storage Account:
enter image description here



This isn't always ideal if you are deploying to multiple environments, so you should be able to alter the configuration from the Azure Portal, by downloading and uploading new configuration, following these instructions.






share|improve this answer
































    1















    So logging to blob storage, think of it as uploading existing files to the blob storage. If your current app creates files, then you should use put blob property or blob append to add these files to blob storage. So you must interact with the storage SDK to make these transactions. You could also leverage logic apps which uses connectors to blob storage, and would perform certain actions based on specific triggers(time stamp and other conditions).



    If you would like to see the generated logs in Azure Storage, you'll have to enable azure diagnostics but these logs would pertain to the storage account itself, not your app.



    Since you mentioned that you see the output, you have to transfer that output as an object ex: (text file), then upload it to the storage account. You can find SDK information for C# here. I hope this helps.






    share|improve this answer

























    • Ok, so the answer is basically 'Build something to upload the logs'. I was thinking that there was a 'Standard' way to connect the two. Thanks for the clues!

      – user230910
      Mar 27 at 22:53











    • Correct :) , no unfortunately we don't have services integrated to perform such action, it shouldn't be very complex though, you can find several samples in GitHub as well

      – Adam Smith-MSFT
      Mar 27 at 23:05











    • Please would you share such an example?

      – user230910
      Apr 3 at 4:33














    Your Answer






    StackExchange.ifUsing("editor", function ()
    StackExchange.using("externalEditor", function ()
    StackExchange.using("snippets", function ()
    StackExchange.snippets.init();
    );
    );
    , "code-snippets");

    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "1"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55386578%2fazure-cloud-service-classic-any-way-to-log-diagnostic-trace-logs-to-blob-sto%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1















    The logging is configured by the diagnostics.wadcfgx file which you can see in your solution.



    enter image description here



    This holds all of the diagnostic information that you want to collect. This can be controlled via the "Properties" of the WebWorker role (right-click -> Properties).



    From there, there is also the option to specify the Storage Account:
    enter image description here



    This isn't always ideal if you are deploying to multiple environments, so you should be able to alter the configuration from the Azure Portal, by downloading and uploading new configuration, following these instructions.






    share|improve this answer





























      1















      The logging is configured by the diagnostics.wadcfgx file which you can see in your solution.



      enter image description here



      This holds all of the diagnostic information that you want to collect. This can be controlled via the "Properties" of the WebWorker role (right-click -> Properties).



      From there, there is also the option to specify the Storage Account:
      enter image description here



      This isn't always ideal if you are deploying to multiple environments, so you should be able to alter the configuration from the Azure Portal, by downloading and uploading new configuration, following these instructions.






      share|improve this answer



























        1














        1










        1









        The logging is configured by the diagnostics.wadcfgx file which you can see in your solution.



        enter image description here



        This holds all of the diagnostic information that you want to collect. This can be controlled via the "Properties" of the WebWorker role (right-click -> Properties).



        From there, there is also the option to specify the Storage Account:
        enter image description here



        This isn't always ideal if you are deploying to multiple environments, so you should be able to alter the configuration from the Azure Portal, by downloading and uploading new configuration, following these instructions.






        share|improve this answer













        The logging is configured by the diagnostics.wadcfgx file which you can see in your solution.



        enter image description here



        This holds all of the diagnostic information that you want to collect. This can be controlled via the "Properties" of the WebWorker role (right-click -> Properties).



        From there, there is also the option to specify the Storage Account:
        enter image description here



        This isn't always ideal if you are deploying to multiple environments, so you should be able to alter the configuration from the Azure Portal, by downloading and uploading new configuration, following these instructions.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Mar 27 at 23:21









        Matt TesterMatt Tester

        2,8842 gold badges24 silver badges30 bronze badges




        2,8842 gold badges24 silver badges30 bronze badges


























            1















            So logging to blob storage, think of it as uploading existing files to the blob storage. If your current app creates files, then you should use put blob property or blob append to add these files to blob storage. So you must interact with the storage SDK to make these transactions. You could also leverage logic apps which uses connectors to blob storage, and would perform certain actions based on specific triggers(time stamp and other conditions).



            If you would like to see the generated logs in Azure Storage, you'll have to enable azure diagnostics but these logs would pertain to the storage account itself, not your app.



            Since you mentioned that you see the output, you have to transfer that output as an object ex: (text file), then upload it to the storage account. You can find SDK information for C# here. I hope this helps.






            share|improve this answer

























            • Ok, so the answer is basically 'Build something to upload the logs'. I was thinking that there was a 'Standard' way to connect the two. Thanks for the clues!

              – user230910
              Mar 27 at 22:53











            • Correct :) , no unfortunately we don't have services integrated to perform such action, it shouldn't be very complex though, you can find several samples in GitHub as well

              – Adam Smith-MSFT
              Mar 27 at 23:05











            • Please would you share such an example?

              – user230910
              Apr 3 at 4:33
















            1















            So logging to blob storage, think of it as uploading existing files to the blob storage. If your current app creates files, then you should use put blob property or blob append to add these files to blob storage. So you must interact with the storage SDK to make these transactions. You could also leverage logic apps which uses connectors to blob storage, and would perform certain actions based on specific triggers(time stamp and other conditions).



            If you would like to see the generated logs in Azure Storage, you'll have to enable azure diagnostics but these logs would pertain to the storage account itself, not your app.



            Since you mentioned that you see the output, you have to transfer that output as an object ex: (text file), then upload it to the storage account. You can find SDK information for C# here. I hope this helps.






            share|improve this answer

























            • Ok, so the answer is basically 'Build something to upload the logs'. I was thinking that there was a 'Standard' way to connect the two. Thanks for the clues!

              – user230910
              Mar 27 at 22:53











            • Correct :) , no unfortunately we don't have services integrated to perform such action, it shouldn't be very complex though, you can find several samples in GitHub as well

              – Adam Smith-MSFT
              Mar 27 at 23:05











            • Please would you share such an example?

              – user230910
              Apr 3 at 4:33














            1














            1










            1









            So logging to blob storage, think of it as uploading existing files to the blob storage. If your current app creates files, then you should use put blob property or blob append to add these files to blob storage. So you must interact with the storage SDK to make these transactions. You could also leverage logic apps which uses connectors to blob storage, and would perform certain actions based on specific triggers(time stamp and other conditions).



            If you would like to see the generated logs in Azure Storage, you'll have to enable azure diagnostics but these logs would pertain to the storage account itself, not your app.



            Since you mentioned that you see the output, you have to transfer that output as an object ex: (text file), then upload it to the storage account. You can find SDK information for C# here. I hope this helps.






            share|improve this answer













            So logging to blob storage, think of it as uploading existing files to the blob storage. If your current app creates files, then you should use put blob property or blob append to add these files to blob storage. So you must interact with the storage SDK to make these transactions. You could also leverage logic apps which uses connectors to blob storage, and would perform certain actions based on specific triggers(time stamp and other conditions).



            If you would like to see the generated logs in Azure Storage, you'll have to enable azure diagnostics but these logs would pertain to the storage account itself, not your app.



            Since you mentioned that you see the output, you have to transfer that output as an object ex: (text file), then upload it to the storage account. You can find SDK information for C# here. I hope this helps.







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Mar 27 at 22:45









            Adam Smith-MSFTAdam Smith-MSFT

            1,9262 gold badges7 silver badges18 bronze badges




            1,9262 gold badges7 silver badges18 bronze badges















            • Ok, so the answer is basically 'Build something to upload the logs'. I was thinking that there was a 'Standard' way to connect the two. Thanks for the clues!

              – user230910
              Mar 27 at 22:53











            • Correct :) , no unfortunately we don't have services integrated to perform such action, it shouldn't be very complex though, you can find several samples in GitHub as well

              – Adam Smith-MSFT
              Mar 27 at 23:05











            • Please would you share such an example?

              – user230910
              Apr 3 at 4:33


















            • Ok, so the answer is basically 'Build something to upload the logs'. I was thinking that there was a 'Standard' way to connect the two. Thanks for the clues!

              – user230910
              Mar 27 at 22:53











            • Correct :) , no unfortunately we don't have services integrated to perform such action, it shouldn't be very complex though, you can find several samples in GitHub as well

              – Adam Smith-MSFT
              Mar 27 at 23:05











            • Please would you share such an example?

              – user230910
              Apr 3 at 4:33

















            Ok, so the answer is basically 'Build something to upload the logs'. I was thinking that there was a 'Standard' way to connect the two. Thanks for the clues!

            – user230910
            Mar 27 at 22:53





            Ok, so the answer is basically 'Build something to upload the logs'. I was thinking that there was a 'Standard' way to connect the two. Thanks for the clues!

            – user230910
            Mar 27 at 22:53













            Correct :) , no unfortunately we don't have services integrated to perform such action, it shouldn't be very complex though, you can find several samples in GitHub as well

            – Adam Smith-MSFT
            Mar 27 at 23:05





            Correct :) , no unfortunately we don't have services integrated to perform such action, it shouldn't be very complex though, you can find several samples in GitHub as well

            – Adam Smith-MSFT
            Mar 27 at 23:05













            Please would you share such an example?

            – user230910
            Apr 3 at 4:33






            Please would you share such an example?

            – user230910
            Apr 3 at 4:33


















            draft saved

            draft discarded
















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55386578%2fazure-cloud-service-classic-any-way-to-log-diagnostic-trace-logs-to-blob-sto%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

            SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

            은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현