Learn about examining the log files through the use of the Kudu utility.
- [Instructor] So Kudu had one log file for us. Let's go back and modify the function. We'll just add another trace line, log.info, and we'll use C# interpolation, so we have a dollar sign followed by double quotes, Jesse's change ran at, and we'll say DateTime.Now, close brace, close quotes, close parens and semicolon.
So we now have a second trace line. Let's save that, run that, and we see in the log that in fact it's completing successfully, and there's my new line. Okay, let's go back to Kudu. So that's back on our diagnostic console page. We'll do exactly what we did last time, click on Functions and function. Here is our function, TimerTriggerCSharp1. Here's our log file. That log file is being updated every second.
So we can download it. There we go. And open that in our finder. And here we see the updated at 1:38 p.m. Let's double click on that. And if we scroll to the bottom, all the way down to the bottom, we're going to see that the change is in there. So we know that this is, in fact, appending to this log file, and that's another way to get at the changes in a more static way that you can review.
Or, if the log output isn't working, this is a way to see what would've been in the log output. The log output typically does work, but it can be a bit finicky.
- Examining and personalizing the Azure portal
- Creating an app service
- Creating an ASP.NET application with Visual Studio
- Viewing your published app
- Creating a virtual machine
- Triggering Azure functions