Open Source .NET Development [Electronic resources]

Brian Nantz

نسخه متنی -صفحه : 275/ 75
نمايش فراداده

Introduction

It is five o'clock on a Friday evening, and you are looking forward to a great weekend. As you turn off your computer and put on your coat, you turn around, and standing directly in front of you is your boss, and by the look on his face, he is not there to wish you a happy weekend. "Our largest customer is having major problems, and I'm going to have to ask you to help me figure them out," he says. After some research, you find that the problem is only on certain machines and is not even in the part of the application that is your code. Does this sound familiar? Where do you start? How do you figure out the problem?

One of the best ways to quickly diagnose a problem is to have good application logging. By "good," I mean logging that is configurable and robust, something that can log more than just the standard application error messages that users are accustomed to seeing but will also log information useful to a developer. To avoid spending your weekend diagnosing and solving someone else's mistake, you need to be able to capture information about the state of the application that is more detailed than just error messages.