az webapp log tail shows duplicate log entries for function apps
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 3.5k
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 60
Description
**Describe the bug**
A user reported in [this issue](https://github.com/Azure/azure-functions-host/issues/1431) that they were seeing duplicate log entries in `az webapp log tail` when used on a function app. I believe the fix that the portal took in that issue needs to be taken in the CLI too. The nature of the fix is described in [this comment](https://github.com/Azure/azure-functions-host/issues/1431#issuecomment-589884907) - the logstream should be pointed specifically at the `LogFiles\Application\Functions\Host` directory using `/api/logstream/application/functions/host`.
**To Reproduce**
Run `az webapp log tail` on a function app, then execute a function.
**Expected behavior**
Log entries appear once.
**Actual behavior**
Log entries are duplicated. Example:

**Workaround**
Until this is fixed, you can use the provider command to force the stream to be scoped to the correct directory. e.g. `--provider application/functions/host`
Contributor guide
Assessment
This issue has not been assessed yet.