Azure Functions with java – How to get the logs written within the function?

I’ve deployed a queue triggered azure function with Java in Azure. I’ve added logback-classic and lombok in pom.xml for logging.
But the logs are not displayed on the function’s monitor > invocation details or the log-streaming service in portal.
But I could see the logs written with context.getLogger(). The logs writter with logback logger is not visible. Please let me know how to check my logs in function invocation.

Following is the queue triggerred azure function handle

public class QueueHandlerFunction {

  public void queueMessageHandler(@QueueTrigger(name = "msg",
      queueName = "my-test-queue", connection = "MyQStorage") final String payload,
      final ExecutionContext context) {

    //Logs with this logger is visible
    context.getLogger().info("Received Message From my-test-queue : " + payload);


Following is the MySampleService class with lombok logger

public class MySampleService {

  public static void handleQueueMessage(final String payload) {"<<<<<<<<<<<< INSIDE THE SERVICE HANDLE >>>>>>>>>>>>");
    if (StringUtils.isNotBlank(payload)) {"Received Payload : {}", payload); //This log not available
        // TODO Work with incoming payload
    } else {"Message payload is Blank."); //This log not available


Following is he logback.xml placed in the resources folder of the maven project.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xml>
   <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
         <pattern>%d{E MMM dd yyyy hh:mm:ss a} [%thread] %-5level %logger{36}
                - %msg%n</pattern>

   <logger name="com.isl.test" level="INFO" />
   <root level="INFO">
      <appender-ref ref="STDOUT" />

And I’ve the following dependencies in the pom.xml


EDIT: Attached portal screenshot for the function invocation logs…

Attached portal screenshot for the function invocation logs

EDIT 2: Added screenshots of local execution and deployed one in portal.

  • Logs in command prompt when is executed locally
    Command prompt when executed the function locally

  • Live streaming console service of the function from the portal for a new message in queue
    Portal Console with live streaming

  • Invocation details of the function from the portal for a new message in queue
    Portal Invocation details

Leave a Reply

Notify of