'How to change logging level for azure-functions-maven-plugin?

I have developed an Azure Function and I run it locally with with "mvn azure-functions:run" command. How do I change the console log level? It appears to be INFO, and prints something like this:

[3/10/18 9:26:38 PM] Generating 1 job function(s)
[3/10/18 9:26:38 PM] Starting Host (HostId=pollux-1571256755, Version=2.0.11587.0, ProcessId=18280, Debug=False, ConsecutiveErrors=0, StartupCount=2, FunctionsExtensionVersion=)
[3/10/18 9:26:38 PM] Found the following functions:
[3/10/18 9:26:38 PM] Host.Functions.post
[3/10/18 9:26:38 PM]
[3/10/18 9:26:38 PM] Job host started
info: Worker.Java.aa343152-8252-4f5b-88bf-664d1f8e0c3e[0]
      Listening for transport dt_socket at address: 5005
info: Worker.Java.aa343152-8252-4f5b-88bf-664d1f8e0c3e[0]
      Microsoft Azure Functions Java Runtime [build 1.0.0-beta-3]
info: Worker.Java.aa343152-8252-4f5b-88bf-664d1f8e0c3e[0]
      [INFO] {MessageHandler.handle}: Message generated by "StartStream.Builder"
info: Worker.Java.aa343152-8252-4f5b-88bf-664d1f8e0c3e[0]
      Worker initialized
info: Worker.Java.aa343152-8252-4f5b-88bf-664d1f8e0c3e[0]
      "post" loaded (ID: 7e6b5aa1-d8d9-496b-ba34-ba12d562e8af, Reflection:   "C:\git\codestrong-a2\jscraper-azure-poster\target\azure-functions\jscraper-azure-poster-20180310145647740\jscraper-azure-poster-0.0.1-SNAPSHOT.jar"::"biz.codestrong.azure.AzureQueuePoster.post")

But I need it to be DEBUG or lower. In my function code, I have a line like this:

context.getLogger().log(Level.FINE, "Created queue client " + queueClient);

This line never prints as it is.



Solution 1:[1]

I don't know the actual answer, but here are 2 ideas:

  1. Create a src/main/resources/application.properties with this content:
logging.level.com.azure.cosmos=DEBUG
  1. IN your host.json, put this:
"tracing":
{
  "consoleLevel": "verbose"
}

Neither one of those worked for me, but I think I am on the right track.

I use Lombok for logging config, and you should too.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 djangofan