You just hit your favorite Web site, but it's taking a bit longer than normal to download the start page. You're wondering if the system is hung or if it's just responding more slowly than usual because of increased load. Chances are the site's system administrator is wondering the same thing, and unless the system can log or otherwise display its operational status and related performance, data she may never know.
Better Late than Never
Sometimes the pressures of getting the release done on time can consume all of your energy. Instead of carefully thinking things through, your overwhelming motivation is just to finish the $@#%&@ software. Since you may not be able to pull yourself out of this line of thinking, it helps to have senior developers who can.
We were just completing our first release of a brand-new enterprise-class system. I wasn't thinking about log files at all. Fortunately for me, and our customers, Dave Smith, one of my senior developers, was, and he took it upon himself to add some of the foundation needed for them. Myron Ahn, another senior developer, extended the log file format and structure and made sure that many parts of the system were logging useful information. I can't claim that this first release was a model of logging tarchitecture beauty, but I do know that it served our initial needs very well and was a very useful foundation for logging data in future releases.
The importance of this lesson has served me well over time. I've added logging, or have substantially enhanced it, in any number of systems since then. Each time the results were worth the effort.
Well-designed logs can help you with a variety of tasks crucial to the marketectural goals of your application. This chapter explores logs, covering such topics as the purpose and audience of log data, the specific content of log files, and log format and management.