Azure / Azure/azure-functions-host

FunctionInvocationContext ILogger missing required scope properties

Open
#1,854 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
2k
Forks
482
Avg merge
2d 10h
Merged PRs (30d)
36

Description

Related to ILogger / tracewriter plumbing

In script invokers (possibly C# as well):

`protected override async Task InvokeCore(object[] parameters, FunctionInvocationContext context)`

I think `context.Logger` should be scoped to the function so that FileLogger writes to LogFiles/Functions/funcname (https://github.com/Azure/azure-webjobs-sdk-script/blob/core/src/WebJobs.Script/Diagnostics/FileLogger.cs#L57 )

It is missing MS_FunctionName, so the logs are dropped

Contributor guide

Open the contributing guide

Research direction

Start at the script invoker's InvokeCore method and inspect how FunctionInvocationContext.Logger is created or scoped. Read FileLogger.cs at the referenced location to confirm how MS_FunctionName determines the LogFiles/Functions/funcname path. Done means function logs are retained under the expected function-specific directory.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, csharp
Domain
backend, cloud
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.