Focusing on Logging
In Chapter 5, I presented a simple logging framework to demonstrate packages. Logging is the recording of data while an application runs and is an important part of application development and maintenance. Messages are logged (captured as formatted records) to files or other destinations to help diagnose any problems that arise as an application executes.
Creating your own logging framework is typically a waste of time and you should use the standard java.util.logging package instead. This package implements Java’s Logging API, which was introduced in Java 1.4. Oracle’s documentation for java.util.logging states that there are four main uses for the logs (repositories of log entries) generated by the Logging API:
- Problem ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access