Welcome
Thank you for purchasing Java Logging with log4j2.
Many years ago, I was a junior developer. My senior developer introduced the concept of logging to me. A few months later, I heard him explain the same ideas to another junior developer. Eventually, it was my turn to explain. What if everyone explaining logging had a book like this one to share? I imagine my mentor giving me a worn copy. He’d say, “Read it, we’ll talk about it tomorrow."
It was also my mentor who sparked my interest in open source. I wanted to contribute code too, and what could be more natural than working on logging itself? I became a member of the Apache Log4j core team in 2009, and I am still there.
When Log4shell, a major security incident, hit the software industry in 2021, I didn’t leave the project— quite the opposite. The incident opened my eyes to the importance of open source and logging, and I was reminded how essential it is to truly understand the tools we rely on.
Those challenges inspired this book—a guide that seniors can pass down to juniors. If you’re reading this as a senior developer, I hope it prompts you to think: "Yes, that’s what juniors need to know!" And if you’re a junior developer, I hope you find it engaging and straightforward to read.
Programming is complicated enough. This book’s goal is not to add to that complexity but to make logging easy to apply and accessible.