Reputation: 2906
I'm new to Java/Spring and whenever I compile and run a package or class in Spring Tool Suite, I will see the output, but STS will also included a bunch of other information that I'm really not concerned about. How can I make it so that STS only shows me the output and relevant errors and not all the extraneous info like the stuff below:
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v2.0.5.RELEASE)
2018-10-01 20:43:06.780 INFO 74504 --- [ main] JDBCTest.CodeWarsAppApplication : Starting CodeWarsAppApplication on Johns-MacBook-Pro-3.local with PID 74504 (/Users/johnwolfe/Documents/workspace-sts-3.9.5.RELEASE/demo/CodeWarsApp/bin/main started by johnwolfe in /Users/johnwolfe/Documents/workspace-sts-3.9.5.RELEASE/demo/CodeWarsApp)
2018-10-01 20:43:06.785 INFO 74504 --- [ main] JDBCTest.CodeWarsAppApplication : No active profile set, falling back to default profiles: default
2018-10-01 20:43:06.840 INFO 74504 --- [ main] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@413d1baf: startup date [Mon Oct 01 20:43:06 CDT 2018]; root of context hierarchy
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.springframework.cglib.core.ReflectUtils$1 (file:/Users/johnwolfe/.gradle/caches/modules-2/files-2.1/org.springframework/spring-core/5.0.9.RELEASE/9f9a828936d81afd49a603bda9cc1aed863a0d85/spring-core-5.0.9.RELEASE.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of org.springframework.cglib.core.ReflectUtils$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
2018-10-01 20:43:07.409 INFO 74504 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Registering beans for JMX exposure on startup
2018-10-01 20:43:07.425 INFO 74504 --- [ main] JDBCTest.CodeWarsAppApplication : Started CodeWarsAppApplication in 0.99 seconds (JVM running for 1.436)
2018-10-01 20:43:07.429 INFO 74504 --- [ Thread-1] s.c.a.AnnotationConfigApplicationContext : Closing org.springframework.context.annotation.AnnotationConfigApplicationContext@413d1baf: startup date [Mon Oct 01 20:43:06 CDT 2018]; root of context hierarchy
2018-10-01 20:43:07.431 INFO 74504 --- [ Thread-1] o.s.j.e.a.AnnotationMBeanExporter
Upvotes: 1
Views: 219
Reputation: 1262
Apparently you need to change the default logger threshold. This can be done in your application.properties or else directly to your logger config file if you are using any third party logging libraries.
The allowed levels are : ERROR
, WARN
, INFO
, DEBUG
, or TRACE
.
For Spring Boot the defaults are :
ROOT :
logging.level.root=ERROR
Spring WEB :
logging.level.org.springframework.web: ERROR
In case you are using Hibernate :
logging.level.org.hibernate: ERROR
More info at Spring's Boot Logging Page
Upvotes: 1