8

Logging Events in Spring Boot

In the previous chapter, we discussed the ideas, features, and implementation of Cross-Origin Resource Sharing (CORS) in securing our application. We also learned about JSON Web Tokens (JWTs) and how to generate one by creating authentication endpoints.

This chapter will focus on logging events in our Spring Boot application. We will discuss the popular packages for logging in to and configuring Spring Boot, where to save them, and what to do with logs as we develop our application.

In this chapter, we will cover the following topics:

  • Getting started with SLF4J and Log4j2
  • Setting up SLF4J and Log4j2
  • Using logs

Technical requirements

The finished version of this chapter’s code may be seen at the following link: ...

Get Spring Boot and Angular now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.