intermediate~2h

Logging

print("here") doesn't survive past your laptop. This module is how a real Spring Boot service tells you what it's doing once it's running somewhere you can't attach a debugger.

Learning objectives

  • Beginner: Add a logger to a class and log at the correct level (debug/info/warn/error) for a given situation.
  • Intermediate: Configure logging output format and level per package in application.properties.
  • Advanced: Set up structured (JSON) logging with a correlation/trace ID so a single request can be followed across log lines.

This is a Pro chapter

Sign in, then upgrade to Pro or Power to unlock this and the full Spring Ecosystem Mastery library.

Logging

Next Step

Continue to Transactions with @Transactional← Back to all Spring Boot chapters