Azure / Azure/azure-cli

az webapp log tail shows duplicate log entries for function apps

Open
#16,921 9 comments 1 reaction 0 assignees View on GitHub
act-observability-squad FunctionApp Functions Service Attention
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:
![image](https://user-images.githubusercontent.com/10663/107802765-a16e4a80-6d16-11eb-8299-075ef1e9c1be.png)

**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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.