How to customize Tomcat log in spring boot ?

Asked

Viewed 461 times

0

I’m having a little problem with my application, the log of my Tomcat is generating a medium large amount of data, and this is slowing down the application of the company, I wonder if there is any way to decrease the amount of log, in other words, if there is a way to customize this log to produce only the data that we think pertinent, or if there is some option to summarize the log, just displaying what is really relevant, I hope I was clear From now on I thank you all

2 answers

1

You can change the amount of log in the file application properties.

Usually when I’m in development I leave DEBUG and when this in production I leave ERROR.

logging.level.=ERROR

Spring Boot Log Docs

0

You can use Log4j, it is a very simple library that can manage the creation of log files, you can create files for specific log types. There are several tutorials on the web, in a very short time you can get around your problem. Site and tutorial that can help you

Browser other questions tagged

You are not signed in. Login or sign up in order to post.