Where does Log files using Azure Bot Framework Go?

981 Views Asked by At

I have a bot that is deployed in azure and is currently used in dev.botframework.com(not yet published).

I added some logs where I am writing in a local directory. Once it is deployed, where is .NET taking the logs? Is is gone to oblivion? or can I set it to be stored somewhere(FTP or something).

Thanks!

1

There are 1 best solutions below

0
On

You can't get access to the local file system, as the bot is published as an App Service. However Azure has some built in tools you can use to access logs, including via FTP.

To use these, you need to output Trace logs. If you were using log4net, you would use a TraceAppender, and other logging frameworks will have similar functionality.

Then you enable diagnostic logs in the portal: FTP credentials and addresses are supplied, or you can use the Log Stream.

Note however that Azure automatically switches filesystem logging off after 12 hours, so if you want constant logging you should choose the "Application Logging (Blob)" option, and retrieve them from the storage account you specify.

enter image description here