Questions tagged [log-rotation]

143 questions
1
vote
0 answers

Rollover logfile on startup and on time and size

Using logback, and its RollingFileAppender, how can I configure a log to roll over on time and size, but also on every application launch? The following config generates a new log file on each day, and when the previous one gets too big. However, it…
HugoRune
  • 13,157
  • 7
  • 69
  • 144
1
vote
1 answer

How to combine log4j daily log rotation with filesize based rotation and maxbackup?

I want to configure the following things for log4j: rotate logfile daily max logfile size 100MB (rotate when the log reaches the limit). compress daily rotated logfiles only keep compressed logfiles for 7 days. log should be written with a certain…
Jürgen
  • 71
  • 2
1
vote
0 answers

Python RotatingFileHandler without renaming existing files

In python, the RotatingFileHandler keeps on changing file extensions every time a rotation takes place. I would really like filenames / filename extensions to be fixed instead - after creation then never change. Example of how it would work: Time…
lucid_dreamer
  • 362
  • 4
  • 9
1
vote
0 answers

How to identify all the log files under being created using log4j under /var/log

I am trying to identify and list all the log files which are being created with log4j. I want to then assert if all these log files have the rotation policies defined in the log4j2.xml files. What will be the best way to list these files which are…
Dipesh
  • 11
  • 1
1
vote
1 answer

CopyTruncate log rotation mechanism is dropping logs

I had implemented a linux based logrotation with copytruncate strategy. Below is the config for same: /data/app/info.log { missingok copytruncate maxsize 50M daily rotate 30 create 644 app app delaycompress compress } With above config, whenever…
abheet22
  • 470
  • 4
  • 12
1
vote
1 answer

Docker + Fluentd in K8s for log rotation: Does Docker need to know the existence of Fluentd?

I am trying to understand the interaction between Docker and Fluentd in a K8s cluster. I have seen places where you need to configure Docker to output to a logging driver, and Fluentd can be used as logging driver, like here. On the other hand, I…
FCR
  • 1,103
  • 10
  • 25
1
vote
1 answer

How to rotate log files that generate with pino-multi-stream?

I am using pino-multi-stream npm package in my node.js project as below: const fs = require('fs'); const pino = require('pino'); const multistream = require('pino-multi-stream').multistream; const path = require('path'); const logDirectory =…
Masoud Sadeghi
  • 357
  • 3
  • 15
1
vote
0 answers

Is there a way to tell ArangoDB to rotate log files

Over a long enough time the Arango log files can grow large. I do not have much access to the systems that will be running Arango, so I am hoping I can have ArangoDB rotate logfiles on some timeframe and keep some number. It looks like the arango…
1
vote
1 answer

What’s Ansible log rotation periodicity?

In ansible.cfg, I use the log_path variable to define where to save Ansible logs. A log file is generated and filled automatically but log rotation seems ineffective. I need information about Ansible logs rotation. When does log rotates - daily,…
symsymmas
  • 35
  • 9
1
vote
1 answer

Custom rotator and namer functions not working with RotatingFileHandler logger handler in python?

I have referred below link for using rotator and namer functions, but they are not working(not making any difference) Link: https://docs.python.org/3/howto/logging-cookbook.html#using-a-rotator-and-namer-to-customize-log-rotation-processing I want…
charanReddy
  • 137
  • 1
  • 11
1
vote
1 answer

Log-rotate delete original file after compressing

I have following files in my someDir: blacklistadm.out00009 blacklistadm.out00008 blacklistadm.out00007 blacklistadm.out00010 blacklistadm.out00025 I have following log rotation pattern in /etc/logrotate.d/: someDir/blacklistadm.out*[0-9]{ …
Dhruv Pandey
  • 482
  • 6
  • 18
1
vote
1 answer

Fluentd logging on kubernetes skips logs on log rotation

Currently, I have the following architecuture in kubernetes: In a pod, a service and a sidecar container (called logger) is running. The services writes to a file, the sidecar container reads that file and writes it to stdout. A fluentd daemonset…
Thomas Böhm
  • 1,456
  • 1
  • 15
  • 27
1
vote
1 answer

Akeneo keeps writing a dev.log

I'm using Akeneo 2.1.8, but on my production server it keeps writing log entries to a var/logs/dev.log. These are simple INFO-entries and add +/- 100 MB every day to the log file. How can I disable the dev.log on production? I cannot seem to find a…
Giel Berkers
  • 2,852
  • 3
  • 39
  • 58
1
vote
0 answers

How to use logrotate to compress files older than 1 day

I've have a list of files below which I wants logrotate to compress if its a day old. So I'm expecting TRACE_03.log, TRACE_07.log, been compressed as it is more than 24 hrs # ls -ltr total 2083312 -rw-r--r--. 1 root root 198176768 Mar 18 01:30…
Gavin Yap
  • 642
  • 12
  • 26
1
vote
1 answer

How to rotate logs daily in rabbitmq

I want to rotate rabbitmq logs daily. It is mentioned in the following link that rotation can be configured using following properties. log.file.rotation.date, log.file.rotation.size, log.file.rotation.count. …
Sainath Batthala
  • 591
  • 4
  • 10