2

I'm trying to create an Azure function triggered with a BlobTrigger. When I'm adding new files to the target container, the function runs which I can see by looking at Invocations as showing with time when triggered and status "Success" in Monitor on Azure portal. However, there's nothing appearing in the Logs apart from the 'Connected!' welcome text.

Here's the boilerplate run.csx I've tried with and without a little modification:

public static void Run(Stream myBlob, string name, ILogger log)
{
///    log.LogInformation($"C# Blob trigger function Processed blob\n Name:{name} \n Size: {myBlob.Length} Bytes");

    log.LogInformation($"C# Blob trigger function Processed blob");
}

and function.json (to which I've added an input binding with the same path):

{
  "bindings": [
    {
      "name": "myBlob",
      "path": "rsqd-ukraine-xl/{name}",
      "connection": "AzureWebJobsStorage",
      "direction": "in",
      "type": "blobTrigger"
    },
    {
      "name": "inputBlob",
      "direction": "in",
      "type": "blob",
      "path": "rsqd-ukraine-xl/{name}",
      "connection": "AzureWebJobsStorage"
    }
  ],
  "disabled": false
}

I'm running this on App Service Plan B1.

What shall I do to see the logs?

1 Answer 1

2

First, you should make sure you have upload one or more files to 'rsqd-ukraine-xl' container.

Second, please notice that azure function log tab is fragile. So it is not show the logs every. If you want to have a look of the logs that the log tab in portal did not shown, you should go to this place:

https://yourfunctionappname.scm.azurewebsites.net/DebugConsole

And then click in LogFiles -> Application -> Functions -> Function -> yourtriggername.

You will find the log files in it.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks. You solution is working. I've also checked back on the portal console and it works as well. Might be they had a temporary issue that day.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.