Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Tomcat's method of using cronolog to cut logs

2025-01-20 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/03 Report--

This article is to share with you the method of using cronolog to cut logs in Tomcat. I believe most people have not yet learned this skill. In order to let you learn, I have summarized the following content. Without saying much, let's read on.

First, install cronologyum-y install cronolog II, configure tomcatvim / usr/local/tomcat-xxx/bin/catalina/sh1, original picture

Replace it with the following 1. Delete line 416 2 and replace org.apache.catalina.startup.Bootstrap "$@" start\ > > "$CATALINA_OUT" 2 > & 1 "&" with the following two places: org.apache.catalina.startup.Bootstrap "$@" start 2 > & 1 | / usr/sbin/cronolog "$CATALINA_BASE" / logs/catalina.%Y-%m-%d.log > / dev/null 2 > & 1 &

3. Restart tomcat with the following results

After reading the above, have you mastered the method of using cronolog to cut logs in Tomcat? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report