question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Function execution logs are duplicated in App Service log stream

See original GitHub issue

If you access the log stream for your entire function app, you will see duplicated entries for function starting/completion:

image

When a function executes with file logging enabled, the following entries are written to both the host log and the function log, i.e. to files in:

  • D:\home\LogFiles\Application\Functions\Host\

  • D:\home\LogFiles\Application\Functions\Function\function-name\

The entries look like this:

2017-04-18T22:54:20.013 Function started (Id=8c130624-cfb2-47d7-8e1f-05047a10a17d)
2017-04-18T22:54:20.013 Function completed (Success, Id=8c130624-cfb2-47d7-8e1f-05047a10a17d, Duration=0ms)

Because the same entry is written to both locations, it appears in the log stream twice.

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:10
  • Comments:28 (11 by maintainers)

github_iconTop GitHub Comments

6reactions
fmannhardtcommented, Jul 12, 2019

This is highly confusing and just cost me a few hours of searching for the reason. It should be fixed or one need to somehow be warned.

4reactions
idusortuscommented, Jun 13, 2022

Five years later and this is still a nuisance. Any solution in sight?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why does azure Function App streaming log viewer ...
It is a bug tracked but not fixed yet. When function code panel is opened, file log(i.e. Application log in Diagnostic logs) is...
Read more >
Why does azure Function App streaming ... - appsloveworld.com
Log streaming console prints both host logs and function logs, so function related entries appear twice. For example, logs with [Info,Function1] prefix are ......
Read more >
Enable streaming execution logs in Azure Functions
To view streaming logs in the portal, select the Platform features tab in your function app. Then, under Monitoring, choose Log streaming.
Read more >
Forwarding Azure Application Logs
Looking to forward Azure platform logs to New Relic? Follow this guide to set up an agentless approach to stream Azure logs to...
Read more >
Lambda Function Log Collection Troubleshooting Guide
If you don't see logs forwarded from a Datadog forwarder Lambda function in the Log Explorer, follow the troubleshooting steps below.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found