1 First steps with Java logging
This chapter covers
- Applying logging to your application
- Understanding log messages
- Introducing popular logging products
When computers had little CPU power and memory compared to today, we had two versions of software: the one that worked and the one that failed. If something broke, we could not see what went wrong. Fixing issues was expensive and time-consuming. The only silver lining? We got paid for the overtime.
At some point, programmers had the idea to let software write each step it took into a file. Now, we could see what was happening in real time. We could understand issues better and fix them sooner. Of course, no more overtime.
Today, developers optimize logging systems for speed, reliability, and flexibility. Now, we can write logs in production systems and monitor certain software behaviors. Logging systems have become a critical part of software development-but what is it?
1.1 What is logging?
Logging is the art of making hidden things visible. In a nutshell, we need logging to: