Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

"invoked by Java Worker" is seen as "Function.My_Function.User" log instead "Function.My_Function"

オープン
#612 コメント 1 件 リアクション 0 件 担当者 1 名 GitHub で見る

@shreyas-gopalakrishna がすでに取り組んでいます。

2023年2月24日 から。

評価

この issue はまだ評価されていません。

説明

area:java-functions Break Change reviewed V5
Repro steps
  • Create a Java function app (via vs code with default option)
  • Run default HTTP trigger (see files in attachment)
    In logs you will get those

[2022-08-12T10:05:22.726Z] Executing 'Functions.HttpExample' (Reason='This function was programmatically called via the host APIs.', Id=a2ec0e2c-a1c0-48d3-89b6-c8a68f66d8e8)
[2022-08-12T10:05:22.863Z] Java HTTP trigger processed a request.
[2022-08-12T10:05:22.869Z] Function "HttpExample" (Id: a2ec0e2c-a1c0-48d3-89b6-c8a68f66d8e8) invoked by Java Worker
[2022-08-12T10:05:22.958Z] Executed 'Functions.HttpExample' (Succeeded, Id=a2ec0e2c-a1c0-48d3-89b6-c8a68f66d8e8, Duration=297ms)

  • In your local.settings.json, add those values (in attachment functionappjava.zip)
    "AzureFunctionsJobHost__logging__logLevel__Function.HttpExample" :"Warning",
    "AzureFunctionsJobHost__logging__logLevel__Function.HttpExample.User" :"Information"

  • We get
    [2022-08-12T10:08:02.088Z] Java HTTP trigger processed a request.
    [2022-08-12T10:08:02.096Z] Function "HttpExample" (Id: 8cc40ca8-2245-4385-bfac-222f6e73d5dc) invoked by Java Worker

"Function "HttpExample" (Id: a2ec0e2c-a1c0-48d3-89b6-c8a68f66d8e8) invoked by Java Worker" comes from https://github.com/Azure/azure-functions-java-worker/blob/master/src/main/java/com/microsoft/azure/functions/worker/handler/InvocationRequestHandler.java#L36 but this useless and it should be seen as "Function.My_Function" log category. In addition, this log seems quite useless due that FunctionApp itself give already the information (execution id, function name, ...)

This logs should be removed or change to fine level.

Expected behavior
  • shown only "Java HTTP trigger processed a request." which is defined from the user code
Known workarounds

Provide a description of any known workarounds.

  • Set .User log to Warning, but we loose all logs in Information in the code
主要言語
Java
スター
103
フォーク
74
平均マージ
12時間 49分
マージ済み PR(30日)
2

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

Azure/azure-functions-java-worker のほかの issue

Azure/azure-functions-java-worker の issue をすべて見る

似ている issue

Java の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。