简体   繁体   中英

Cloud service web role trace statements are not writing to file but writing to logs table

Cloud service web role trace statements are not writing to file but writing to logs table,I read through the many blogs and configured all config files but still am not able to find why these trace statements are not writing to file as well as container also not created. I checked the connection string which is correct. Please suggest if any one has IDEA on this. really struck up here also please suggest is there any other logging framework can be used in cloud service web role c#. My requirement is to capture all trace statements in a log file and update these statements in a blob. and this blob should be taken backup on next day and another log file should be generated in the blob

Trace logs are always written to WADLogsTable table in your diagnostics storage account. If your requirement is to persist them in blob storage, there are two things you could do:

  1. Let them persist in table storage and then every day read data from this table, create a CSV file of that data, and save it in blob storage. Once the blob is saved, you can delete the entries from table.
  2. Implement your own trace logs collection logic using something like NLog and have it persist in blob storage. Azure CAT team has an excellent project where they make use of NLog to collect and persist diagnostics data in blob storage. You can read more about this project here: http://social.technet.microsoft.com/wiki/contents/articles/18146.windows-azure-telemetry-basics-and-troubleshooting.aspx .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM