Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Reading 'man logrotate' and checking out the examples in /etc/logrotate.d/ should get you there. The facility does not matter and make sure you restart (kill -HUP) syslogd. If unsure create the logrotate script for app and fill it with what you require and post it.
/var/log/app.log is not getting rotated when it's size exceeds 1M even though i have mentioned the same in /etc/logrotate.d/app.
Remove the "daily" directive, prohibiting the log file from getting rotated every day. Then test by letting the log file exceed 1M and run 'logrotate -d /etc/logrotate.d/app'. Confirm the output alerts you the log now needs to be rotated.
Removing the daily directive from /etc/logrotoate.d/app didn't help.
As a technical person (or so I would hope) you should realize "didn't help" and "doesn't work" are about the least interesting things to reply especially since I showed you how to debug logrotate. if that isn't a hint I'm ready to repeat that but with caps lock on.
Quote:
Originally Posted by kamalkgarg
But I don't know how is this going to affect other stuff.
Logrotate can easily run at an interval shorter than once a day but FCOL! If you don't know how running logrotate every minute will affect "other stuff" then why the ${PURPORTEDLY_EXCEEDINGLY_WARM_LOCATION} do you do stuff like that in the first place?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.