2
votes

I'm using Azure Webapp (Windows) to host a nodejs app. Inside my app, I'm using bunyan as my logger library.

I have configured App logging to Azure Storage Blog through the web portal. I selected the storage accounts, blob container, etc.

If I go to Log Stream, I do see the logs from my app in the portal. However, those logs are not being stored in the selected Blob container. There's a folder (inside the container) that was created by the app service and it does log things like when a new version of my app is deployed using a CSV file but that's all.

I've read my posts indicating that Nodejs is not supported for this environment (logging to blob storage). Is this true? Am I missing something?

1

1 Answers

0
votes

For node.js websites the way to write application logs is by writing to the console using console.log('message') and console.error('message') which goes to Information/Error level log entries. Currently only supported target for the nodejs log files is the file system.

It looks as though you can't use blob storage for application logs in Azure Web Apps. However Azure blob storage adapters for popular nodejs loggers such as winston: winston-azure-blob-transport.