Reputation: 672
I am using Third Party jars which are appending their own logs in my Java Application's Log file , I don't want to append those third party logs in my log file as it makes log file very clumsy and confusing.
The logs are like -
`2016-11-03 12:59:41.910 ERROR 13586 --- [ main] o.h.j.i.metamodel.MetadataContext : HHH015011: Unable to locate static metamodel field : org.openskye.domain.TaskQueue_#object_metadata_id
2016-11-03 12:59:41.913 ERROR 13586 --- [ main] o.h.j.i.metamodel.MetadataContext : HHH015011: Unable to locate static metamodel field : org.openskye.domain.TaskQueue_#id
2016-11-03 12:59:41.914 ERROR 13586 --- [ main] o.h.j.i.metamodel.MetadataContext : HHH015011: Unable to locate static metamodel field : org.openskye.domain.TaskQueue_#status
2016-11-03 12:59:41.914 ERROR 13586 --- [ main] o.h.j.i.metamodel.MetadataContext : HHH015011: Unable to locate static metamodel field : org.openskye.domain.TaskQueue_#path
For hide the logs for the package available in my application I use
logging.level.package-name= INFO
but this is not work for the third party jar. Please help me
`
Upvotes: 0
Views: 1755
Reputation: 46
You can set the rootLogger level to OFF and than set the logLevel for your base package to what ever you want, this leads to logging only for your classes.
Upvotes: 1