Local Development Configuration

Overriding Configuration Locally

Spring Boot provides several ways to override configuration without modifying files that are committed to Git.

Spring Boot automatically loads configuration files from a config/ subdirectory in the working directory. This directory is already listed in .gitignore.

Create configuration files in the config/ directory at the project root:

config/application.yml
logging:
  level:
    org.hibernate.SQL: DEBUG
    org.hibernate.type.descriptor.sql.BasicBinder: TRACE
    za.co.idealogic.event.admin: TRACE
Spring Boot loads files from config/ with higher priority than src/main/resources/config/, so your local settings will override the defaults.

Option 2: JVM Arguments

Pass logging overrides via command line or IDE run configuration:

java -jar admin-service.jar \
  -Dlogging.level.org.hibernate.SQL=DEBUG \
  -Dlogging.level.za.co.idealogic.event.admin=TRACE

In IntelliJ IDEA, add these to "VM options" in your Run Configuration.

Option 3: Environment Variables

Environment variables use uppercase with underscores replacing dots:

export LOGGING_LEVEL_ORG_HIBERNATE_SQL=DEBUG
export LOGGING_LEVEL_ZA_CO_IDEALOGIC_EVENT_ADMIN=TRACE

Common Debug Scenarios

Scenario Logger Level

SQL queries

org.hibernate.SQL

DEBUG

SQL parameter binding

org.hibernate.type.descriptor.sql.BasicBinder

TRACE

Application services

za.co.idealogic.event.admin

DEBUG/TRACE

Security/authentication

org.springframework.security

DEBUG

HTTP client calls (WebClient)

reactor.netty.http.client

DEBUG

Hazelcast cache

com.hazelcast

DEBUG

Example: Full Debug Configuration

config/application.yml
logging:
  level:
    ROOT: DEBUG
    org.hibernate.SQL: DEBUG
    org.hibernate.type.descriptor.sql.BasicBinder: TRACE
    za.co.idealogic.event.admin: TRACE
    org.springframework.security: DEBUG
    reactor.netty.http.client: DEBUG

spring:
  jpa:
    show-sql: true
    properties:
      hibernate.format_sql: true
Remember that config/ is gitignored. Your local configuration will not be committed.