I am trying to exclude all internal spring boot logs inside my docker container but for some reason I can’t.
I tried a lot of things, for example the following commands inside my application.properties file:
logging.level.*=OFF
or logging.level.org.springframework=OFF
or logging.level.root=OFF
, but they not worked, inside docker container a see next logs (part of them):
2024-07-31 16:42:00 13:42:00.775 [main] INFO org.f1r3fly.Main -- Starting Main using Java 17.0.2 with PID 1 (/app/DiscordBot.jar started by root in /app)
2024-07-31 16:42:00 13:42:00.965 [main] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory -- Autowiring by type from bean name 'jsonMixinModuleEntries' via factory method to bean named 'org.springframework.context.annotation.AnnotationConfigApplicationContext@3b2da18f'
I’m also tried to set JVM args inside my docker file:
# Set the command to run the application with logging turned off
CMD ["java", "-Dlogging.level.root=OFF", "-jar", "DiscordBot.jar", "--spring.config.location=/app/config/application.properties"]
but this approach also, didn’t work.
Can someone help me, how I can set off all internal springboot logs for my docker container?
ScalaRQ is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.