Presentation is loading. Please wait.

Presentation is loading. Please wait.

Lesson 12.

Similar presentations


Presentation on theme: "Lesson 12."— Presentation transcript:

1 Lesson 12

2 Plan for today NO QUIZ Acceptance Testing Feedback
Finish ASP.Net Core tutorial Start with Slide 37 Debugging (using the Visual Studio debugger) ASP.Net Core – Logging There will be a quiz next lecture

3 Acceptance Test Feedback
Don’t forget to list ‘negative’ cases Trying to register a new account and it doesn’t work (why not?) – what happens? Don’t forget the story ID’s These must match the relevant requirement in the Requirements Doc Finish this for Monday! Every single requirement should have acceptance tests!

4 Logging Your program (web app) will run on a server, 24x7, forever and ever If something goes wrong you want to get useful info about what happened You may not be able to attach the debugger to the web app You may not be able to reproduce the problem Logging: Saving messages for later reference, in order to help you figure out what your program is doing wrong / underperforming / how that hacker broke into your system / etc

5 Tutorial We’ll be walking through:

6 Providers “A logging provider takes some action on logged data, such as display it on the console or store it in Azure blob storage. ” Examples of providers: Print it to the console (just like Console.WriteLine) Save it to a file Save it to a database Save it to Azure (aka “save it to a file/database in the cloud”) Built-in providers: logging-providers You can also use 3rd party providers (your own, or written by someone else)

7 Providers Let’s add in the Console & Debugger providers, as per that first step in the turorial

8 Adding Items To The Log(s)
<Let’s look a the sample code in “How to create logs”> Let’s go through “Sample logging output”

9 Adding Items To The Log(s)
Categories So you know where the message is coming from Log Level You can specify how important it is to see the message You can then tell the logger what level (and above) you want to see This way you can put a ton of messages in at the ‘Debug’ (lowest) level, set the level to display higher for day-to-day use, and only see critical messages normally. Once you know there’s a bug you can change the log level to be ‘debug’ to get detailed information (for debugging purposes) This is covered in the “Log filtering” section

10 Let’s Add Logging To Your App


Download ppt "Lesson 12."

Similar presentations


Ads by Google