Google Cloud Logging severity is always INFO

Our app is deployed on Google Cloud Kubernetes.
I tried Slf4j, google-logging, etc. but the severity is always “INFO” . Do you know how we can change this?
image

Hello, as i understand, your deployment has different level of logging. You can add environment variable for _JAVA_OPTIONS=-Dlogging.level.org.springframework=DEBUG (DEBUG TRACE etc) / more shorten java -jar target/app.jar --trace (trace level log for spring)

But jmix has more logging levels:

  • Spring Boot also gives us access to a more fine-grained log level setting via environment variables. There are several ways we can accomplish this.
    -Dlogging.level.org.springframework=TRACE
    -Dlogging.level.com.baeldung=TRACE
  • Jmix
    #‘debug’ level logs SQL generated by EclipseLink ORM
    logging.level.eclipselink.logging.sql = info
    #‘debug’ level logs data store operations
    logging.level.io.jmix.core.datastore = info
    #‘debug’ level logs access control constraints
    logging.level.io.jmix.core.AccessLogger = debug
    #‘debug’ level logs all Jmix debug output
    logging.level.io.jmix = info

Let’s summarize the results:

you can choice two ways of change level logs:

  1. create spring profile, inside profile change log levels and active profile inside your deployment command
  2. add environment variable for java vm like i wrote (_JAVA_OPTIONS=-Dlogging.level.org.springframework=DEBUG)

Sources: