Reputation: 60
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?
Upvotes: 2
Views: 898
Reputation: 14080
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.
Upvotes: 2