Questions tagged [logrotate]

A Linux tool for log files management. Do not use this tag for general questions about usage of logrotate and troubleshooting, but for programming questions related to logrotate.

Quoting the man page:

logrotate is designed to ease administration of systems that generate large numbers of log files. It allows automatic rotation, compression, removal, and mailing of log files. Each log file may be handled daily, weekly, monthly, or when it grows too large.

469 questions
0
votes
1 answer

logrotate archive the dateext archived log files again

On my CentOS 6.5, A couple of sites are running and I set logs directory separately. loglotate works weekly but the results is not good. it archive already archived logs again every week. here is /etc/logrotate.d/sites file. /home/site1/logs/httpd/*…
ukits
  • 67
  • 1
  • 11
0
votes
1 answer

Python tail with grep

Please help me. I have a log files, for example: test_2014_03_13.log i need tail it with grep and when created new file (test_2014_03_14.log) i need switch tailing with grep to a new file without skipping lines. i need info about switching without…
0
votes
1 answer

Using logrotate with syslog-ng on raspberry pi (how to delete old logs?)

Ok.. I'm using my raspberry pi as a syslog server for a Cisco ASA and a Cisco router. I have the logs being populated to my /var/log/network destination. They are currently being logged with the format: _$MONTH$DAY$YEAR.log, with ROUTER or FIREWALL…
kbarnes
  • 11
  • 1
  • 4
0
votes
1 answer

Apache2 log file size and performance

Does having a large access log file hinder performance? What is an appropriate file size limit for Apache2 logs? I have log rotate running in cron daily, and the limit is 52 MBs, but this is run once a day and the log file is getting to about 200…
Furbeenator
  • 8,106
  • 4
  • 46
  • 54
0
votes
0 answers

Lost reference to File when I rotate a file in Java

I want to know when a file has rotated because because I'm watching a file and I have to get a new file with the content of this file and the new file. I have to use Java6, so I don't have the new features of JDK7. The problem is that when I rotate…
Guille
  • 2,248
  • 3
  • 24
  • 42
0
votes
1 answer

Bash script use of "OR" operator

My default logrotate script for apache is: /var/log/httpd/*log { missingok notifempty sharedscripts postrotate /sbin/service httpd reload > /dev/null 2>/dev/null || true endscript } I understand the output and error…
0
votes
1 answer

How to avoid log4j output external modification

I had a request to find a solution for making a log file secure from editing from the user (not root user) running the JBoss instance of an application (Linux environment) First idea I had is to use the chattr +a from root user to allow only the…
AndroX
  • 103
  • 3
0
votes
1 answer

Logrotate script only triggers correctly during manual execution

Good day! I tried to use the logrotate facility of linux to rotate my tomcat logs. I created a script named tomcat under /etc/logrotate.d /path/to/tomcat/catalina.out { missingok copytruncate daily rotate 10 compress size…
Oneb
  • 375
  • 1
  • 10
  • 21
0
votes
1 answer

How to set log rotate for an application for compressing and rotating at interval of 5 days?

I am facing the problem in doing the settings in logrotate.conf I had done the settings once, but it didn't work accordingly. The main condition is to rotate the log files along with compression at the interval of 5 days …
Abhishek Tripathi
  • 1,570
  • 3
  • 20
  • 32
0
votes
1 answer

Logrotate for log files without `.log` extension

I need to have logrotate rotate all the logs in a direcory, but those log files have NO extension. I'd like to know if the Linux logrotate command also works for files not having .log extension.
user1718482
0
votes
1 answer

uwsgi logrotate not working

I have set up the configuration file for uwsgi logrotate. When I tested it, it seemed it will work. logrotate -dvf /etc/logrotate.d/uwsgi reading config file /etc/logrotate.d/uwsgi reading config info for "/var/log/uwsgi/*.log" Handling 1…
Jayadevan
  • 1,306
  • 2
  • 12
  • 33
0
votes
2 answers

CentOS 6.4 logrotate show error permission denied

I downloaded a tomcat7 tar.gz file from tomcat's official site on my CentOS 6.4 OS(Binary Distributions tar.gz , not yum). I want to use logrotate to roll my tomcat log. So I create the file /etc/logrotate.d/tomcat7 within the following…
Feng Yu
  • 1,431
  • 2
  • 18
  • 26
0
votes
1 answer

can a logrotate config point to a directory

Primary question: Is it a valid option in a logrotate config to have the targeted log be a directory? I have seen several examples using the wildcard notation of /var/log/example/*.log, but I am curious if the option of /var/log/example will give a…
DavidC
  • 78
  • 1
  • 7
0
votes
2 answers

Python logrotate options

What is the correct process for having logrotate manage files written to by the python logging module? Usually I would use a WatchedFileHandler but I need to target 2.4, which does not have this class. Is there a function in the logging module which…
0
votes
1 answer

Using logrotate recipe in chef - no rotated logs created

I am trying to use the chef logrotate recipe. include_recipe "logrotate" logrotate_app "kafka-logs" do cookbook "logrotate" path "/tmp/kafka.log" frequency "daily" size "1k" rotate 10 create "0644 root root" end I am trying to rotate…
Tampa
  • 75,446
  • 119
  • 278
  • 425