Exercise - Create a log file viewer

Completed

In this exercise, you build a small event logger. Your program appends a new entry to a log file every time it "runs," without erasing what's already there, then reads every entry back one line at a time to display the full history and count how many events have been logged. You practice using File.AppendAllText() to add to a file, and a StreamReader with .ReadLine() in a loop that keeps going until it reaches the end of the file.

Launch the exercise and follow the instructions.

Screenshot of the button that launches the create a log file viewer exercise in a new browser tab.