Questions tagged [log-rotation]
143 questions
3
votes
0 answers
STDOUT and STDERR log rotation TOMCAT in windows
I’m new to solr and not very good with java.
we are using solr as our search solution and tomcat is hosted as a service in windows and solr is runs in tomcat.
We are trying to implement log rotation for tomcat. We tried using log4j.properties in…

Harikrishnan N
- 53
- 1
- 2
- 7
3
votes
0 answers
Boost.log: reset log rotation counter, when filename changes on midnight
I use a textfile backend for a sink, which contains to placeholder elements
date
log-rotation counter
"%Y-%m-%d_mylogfile_%3N.log"
Furthermore, the backend is configured to rotate at a certain size and at midnight.
using namespace…

nils
- 61
- 4
3
votes
1 answer
Logrotate not rotating old files even after rotate is set to 0
In my log rotate setup, for a specific log file the rotate has been set to 0. But once the size of the file is reached, the old file is rotated to application.log.1 instead of being deleted.
As per the documentation, the file should be deleted when…

Aravindh S
- 1,185
- 11
- 19
3
votes
1 answer
How to find a file that's been moved/renamed in Java
I would like to have some sort of file handle to a file that survives file moves/renames. This does not have to be platform independent, it's fine if it only works on Java7+linux, and even fine if the files can be assumed to not change…

Thomas Larsson
- 697
- 1
- 8
- 17
3
votes
0 answers
Best way to rotate Rails log files daily in 2015
What is the best way to rotate Ruby on Rails log files daily?
I saw posts in the past. They recommended using logrotate and enable copytruncate option to avoid restarting Rails.
However, logs are lost at small time slice between copying the file and…

ma2gedev
- 151
- 6
2
votes
0 answers
linux log rotate for PostgreSQL not rotate the log when log reached threshold
I am trying to the setup and control PostgreSQL logs by Linux log rotate as the following
logrotate_PostgreSQL.conf file looks like this
/var/log/PG/*.log {
size 10K
rotate 10
copytruncate
missingok
delaycompress
nomail
…

Judy
- 1,595
- 6
- 19
- 41
2
votes
1 answer
Logrotate of /var/log/messages files
How can I set log rotate to, /var/log/messages files,
all the files with the name "messages",
rotate every 4 days (to keep last 4 files),
not to generate any error messages??
/var/log/messsages-* {
dateext
maxage 3
rotate 4
missingok
nocompress
}
Is…

Rajitha Hewabandula
- 21
- 2
2
votes
1 answer
Rotate custom logs on AMI Linux 2
I need to rotate my Resque logs on AWS Elastic Beanstalk on AMI Linux 2 with Ruby. My Puma and Nginx logs rotate properly. I've added the following config below, but the logs are not getting rotated.
.ebextensions/03_publish-logs.config
files:
…

fnllc
- 3,047
- 4
- 25
- 42
2
votes
0 answers
Journald SystemMaxUse when machine-id changes
I am using journald on an embedded system for logging to a persistant drive. The maximum stored logs are limited using the config parameter SystemMaxUse= and log rotation enabled. This works fine, until the systemd machine-id changes during software…

Martin H.
- 185
- 2
- 16
2
votes
1 answer
Handling logrotate in open()
I am using the following function to follow and process a logfile line by line:
def tail(f):
f.seek(0,2)
while True:
line = f.readline()
if not line:
time.sleep(0.1)
continue
yield line
with…

tilkov
- 340
- 4
- 9
2
votes
1 answer
Easier way to check and test logrotate configuration
I'm trying to setup a logrotation to rotate the logs daily, for 14 days. In the posst rotate, it will cal a separate script to tar any log older than 10 days. Files older than 14 days will be deleted.
So far, the rotation seems to work fine, but…

SVill
- 331
- 5
- 22
- 55
2
votes
1 answer
Logger file rotation not working when python code started from windows service
I am starting a python application (exe version created using pyInstaller) from a windows service (created in python, converted to exe using pyinstaller and installed using sc) but the log files generated by my application are not getting…

Nirvana
- 65
- 10
2
votes
1 answer
Is there any way to add a delay before compressing the rotated log file
I need to add a delay of some unit time before compressing the rotated log file. I am using logback-core and my xml looks like this:-

adarsh
- 348
- 1
- 4
- 17
2
votes
1 answer
Perl - how to skip the lines already read in a previous processing
I have a problem with following Perl program, which can be used to reorganize perform the trace of accesses to an application.
I've implemented following solution with jump rows function, because next in the future I could have 10 or more rotated…

clarkseth
- 229
- 4
- 16
2
votes
2 answers
How to daily rotate logs, with data from the current day only?
I rotate my nginx access log files with logrotate an have the following config:
/var/www/logs/*.log {
daily
missingok
dateext
dateformat _%Y-%m-%d
dateyesterday
rotate 90
compress
delaycompress
compressext
…

Migster
- 153
- 1
- 10