问题
I have a frequently running triggered webjob (every 3 minutes) and others that are triggered weekly/daily and some running continuously.
If I visit https://xxxx.scm.azurewebsites.net/azurejobs/#/functions the site takes forever to load as it tries to load and index function invocations and these get overwhelmed by the output from the frequent job.
My questions:
- How can I set the logging retention for a particular webjob?
- Anything I write to the console shows up in the Webjob run details page but nothing from the
TextWriter
. Since both outputs seem to get persisted, which is the recommended way?
回答1:
- There is no way currently to set the retention policy. Sorry. Feel free to open a bug here: https://github.com/Azure/azure-webjobs-sdk
- Console messages end up in the webjob logs (the top level job). TextWriter messages end up in the function invocation log. If you write to console, you also have a concurrency issue because multiple functions can run at the same time so the logs might be mixed up.
来源:https://stackoverflow.com/questions/31867532/azure-webjobs-output-logs-indexing-taking-very-long