0

In a typical Spring Boot application like this, how do we configure it to use a "custom" log configuration?

For example, in the current environment that my app runs, logback is causing error, how can I use other logging for example:

[INFO] java.lang.NoClassDefFoundError: java.io.FileOutputStream is a restricted class. Please see the Google  App Engine developer's guide for more details.    
[INFO]  at org.springframework.boot.logging.logback.LogbackLoggingSystem.initialize(LogbackLoggingSystem.java:100)
    [INFO]  at org.springframework.boot.logging.AbstractLoggingSystem.initialize(AbstractLoggingSystem.java:58)
    [INFO]  at org.springframework.boot.logging.LoggingApplicationListener.initialize(LoggingApplicationListener.java:181)
    [INFO]  at org.springframework.boot.logging.LoggingApplicationListener.onApplicationEvent(LoggingApplicationListener.java:122)
    [INFO]  at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:98)
    [INFO]  at org.springframework.boot.context.event.EventPublishingRunListener.publishEvent(EventPublishingRunListener.java:92)
    [INFO]  at org.springframework.boot.context.event.EventPublishingRunListener.environmentPrepared(EventPublishingRunListener.java:58)
quarks
  • 33,478
  • 73
  • 290
  • 513

1 Answers1

1

Spring Boot configures Logback by default, and you use standard configuration--just have a logback.xml or logback.groovy available as a classpath resource at runtime. In the GAE case, you'll need to configure the logger to use GAE-approved output targets.

chrylis -cautiouslyoptimistic-
  • 75,269
  • 21
  • 115
  • 152