Questions tagged [log-rotation]
143 questions
0
votes
0 answers
Unable to get previous days logs for the pod which is running from last 10 days
I am unable to get previous days' logs for the pod. I am only getting the logs for the same day. I am trying to check if any log rotation is configured or not for the pod, I described the pod and checked but I couldn't find anything. I also tried …
0
votes
0 answers
Logrotate : Is there a way to append log contents when rotation happens multiple times a day
I'm trying to rotate logs daily EXCEPT when my logfile is over 500M then it should be rotated asap, so I've copied my /etc/cron.daily/logrotate into /etc/cron.hourly and my config file looks like this :
compress
missingok
/path/to/my/logfile.log
{
…

Vabres
- 1
- 2
0
votes
2 answers
linux logrotate, rotate file with underscore
I have a logrotate configuration which is given below.
/var/log/Test.log {
size 50k
missingok
rotate 10
notifempty
create 0640 root root
}
The file is rotating successfully once it reached the size of 50kb in the below…

user3441151
- 1,880
- 6
- 35
- 79
0
votes
0 answers
Logrotation not appending new logs to existing logs but writing logs from beginning
we have a log rotation stub in a cron job as given below, say $1 is /var/tmp/abc.log, MAX_LOG_SIZE_IN_BYTE is 5000 (i.e 5 KB), MAX_LOG_COUNT is 5
which says the expectation is to append logs to existing log file and if log file size crosses 5 KB,…

hitesh adabala
- 1
- 3
0
votes
0 answers
Python log rotation does not happen hourly
I have following yaml based logger configuration in my python application.
---
version: 1
disable_existing_loggers: False
formatters:
# formatters here
handlers:
debug_file_handler:
class: logging.handlers.TimedRotatingFileHandler
…

vigamage
- 1,975
- 7
- 48
- 74
0
votes
0 answers
Winston logging library unable to remove large log files
We have a node js application , which didn't have a log rotation concept to start with and the all the content used to be written into the same file and it grew so large the file size is now 1.5Gb on average. Let's call it app.log
Now we have…

Pavan Kumar
- 31
- 5
0
votes
0 answers
Logrotate inside docker container not letting go of files?
Technical details:
Docker versions: This has happened on docker 18, 19 and 20, at several minor versions.
19.03.12 and 20.10.3 are the most recent installs I've got running.
OS: Ubuntu 16.04/18.04/20.04, all display this behavior.
All installs use…

KoenDG
- 107
- 8
0
votes
1 answer
Apache Artemis logging to rotate log files
In installed Artemis broker logging.properties, i have included below configuration to setup log rotate
# File handler…

Tim
- 1,321
- 1
- 22
- 47
0
votes
1 answer
how does logrotate actually works
I am trying to the setup log for the httpd server then I write a script in /etc/logrotate.d/apache.conf
/var/log/httpd/* {
daily
rotate 3
size 20K
compress
delaycompress
}
what I understood from this file
/var/log/httpd/* =…
user15224751
0
votes
0 answers
Logrotate not deleting rotated logs
I've implemented a Fluentd sidecar to rotate logfiles stored on a Kubernetes cluster.
The container uses the following config to run logrotate every 15 minutes on a cronjob.
*/15 * * * * /usr/sbin/logrotate -v…

Garreth
- 1,057
- 2
- 9
- 24
0
votes
1 answer
C# Nlog - How to rotate log files so it creates rotated logs file and archives
I have a trouble with creating a following log rotation settings:
1 - Current log file (service.log)
10 - rotated logs file like service.1.log, service.2.log etc. Log files size are 10MB.
10 - archived logs
When the file reaches 10mb, we discard it…

Yaroslav Prokopenko
- 21
- 4
0
votes
1 answer
Python Custom logging handler to create each log file per key in the dictionary
I have a dictionary with some sample data like below
{"screener": "media", "anchor": "media","reader": "media"}
and I wanted to create a log file for each key in the dictionary. I'm planning to use this logging in streaming job which will get…

Learnis
- 526
- 5
- 25
0
votes
1 answer
Weblogc log rotation not working as expected
I have set log rotation(Application server log) to 10000KB of 50 files in WebLogic but it is writing to single file. Is there any other configurations have to be done other-than this log rotation configurations.

HS447
- 81
- 9
0
votes
1 answer
Why writing logs on multiple files at the same time when using log rotation in my flask application running on gunicorn?
I am running my flask web application on gunicorn and using RotatingFileHandler for logging.
I found my app was accessing multiple logging files including back files to log and I could observe sizes of all files in a logging directory was getting…

Ryan Kang
- 61
- 1
- 5
0
votes
1 answer
Multiple log file and log rotation in Ruby on Rails
I'm a newbie in ruby on rails. I struggled to find the solution for writing multiple logs and the daily rolling file appender.
The output will be like that: (logfile in folder {my…

ngoctrambui
- 141
- 1
- 4