3
votes

I'm having trouble figuring out why the webjob is storing all of the logs in the same container, which makes it difficult to search through the log for specific messages from a selected webjob at a certain time.

My storage account consist of 5 containers, 4 of which have been automatically created by the app service when given the connection strings of the storage account (the AzureWebJobsDashboard and AzureWebJobsStorage application keys are set to the connection string for the shared storage account). The last container was manually created in the storage account and is also linked to in the app service(app settings).

Containers in storage account:

  • azure-jobs-host-archive
  • azure-jobs-host-output
  • azure-webjobs-dashboard
  • azure-webjobs-hosts
  • cen-dev-test

As it is now there exists a log file in cen-dev-test which holds logging for every webjob(from the same app service) in a single file. However, there exists folders for the individual webjobs which are merely used for startup logging.

My question is therefore: is there a way where log files can be automatically created according to which webjob they contain?

1

1 Answers

0
votes

is there a way where log files can be automatically created according to which webjob they contain?

Based on my experience, currently it seems that it is not supported by Azure. It is a nice thought, we could give our idea to Azure team.

If we want to get the individual webjobs log we could use the Webjob API. The following is an example how to get the continuous job log:

 https://{userName}:{password}@{WebAppName}.scm.azurewebsites.net/vfs/data/jobs/continuous/{jobname}/job_log.txt