Azure application logging (blob) for node.js deployed as application service

I deployed the node app as an azure app service. And turned on azure Application Logging (blob) with the Verbose log level and linked the blob storage account. But my node.js console.log and console.error do not appear in blob. I still keep getting stdout and stderr file in file system registry.

My iisnode.yml file has the following content -

nodeProcessCommandLine: "D:\Program Files (x86)\nodejs\6.3.0\node.exe" nodeProcessCountPerApplication: 2 loggingEnabled: true logDirectory: iisnode maxLogFiles: 100 devErrorsEnabled: true configOverrides: "iisnode.yml" asyncCompletionThreadCount: 20 flushResponse: true 
+6
source share
1 answer

I'm trying to do the same right now and stumbled upon this:

For node.js sites, the way to write application logs is to write to the console using console.log ('message') and console.error ('message'), which goes to the information / error level log entries. Currently, the only supported target for log files for node.js is the file system.

It looks like you cannot use blob storage for application logs in Azure Web Apps. However, there are Azure blob storage adapters for popular nodejs registrars like winston: winston-azure-blob-transport

+2
source

Source: https://habr.com/ru/post/1011895/


All Articles