Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Logging a Node.js-Azure app, using Bot Framework

I have a Node application (Bot Framework bot) hosted on Azure. What's the best way to log information for debugging? For example, as far as i'm aware, using console.log() isn't helpful because there is no console to look at in Azure. I also do not want to call tons of session.send() to the client.

So whats the best way to get some sort of debug logging?

like image 984
Orbit Avatar asked Feb 11 '26 13:02

Orbit


1 Answers

You can leverage the Diagnostic Log extension on Azure Web Apps. Login your web app in Azure portal(https://ms.portal.azure.com/). Click on Diagnostic logs in settings option and Turn On Application logging in Diagnostic Logs Tab. enter image description here

And then you can login the Kudu console site of your web app(https://<Your_Webapp_name>.scm.azurewebsites.net/DebugConsole) and browse to your Application folder(D:\home\LogFiles\Application folder). enter image description here

Otherwise, you can click the Diagnostic dump on the top nav bar of the kudu console site to download the log files. enter image description here

On the other hand, you can use the Log stream tool on the Azure portal(https://ms.portal.azure.com/) for a real time debugging online. enter image description here

At last, you can integrate a 3rd part node.js log modules, such like winston into your application. And catch the logs into your own log file.

Any further concern, please feel free to let me know.

like image 160
Gary Liu Avatar answered Feb 15 '26 05:02

Gary Liu



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!