Problem:
foreman production log grows in size quickly
Expected outcome:
Old behavior retained
Foreman and Proxy versions:
3.18.1
Foreman and Proxy plugin versions:
Distribution and version:
Other relevant data:
1Mio log lines since beginning of the month:
# tail -n 1000000 /var/log/foreman/production.log | head
2026-04-09T00:03:30 [I|app|4efe3e42] Rendered api/v2/config_reports/create.json.rabl (Duration: 1.3ms | Allocations: 794)
2026-04-09T00:03:30 [I|app|4efe3e42] Completed 201 Created in 64ms (Views: 1.8ms | ActiveRecord: 17.8ms | Allocations: 34544)
What is the difference in your logs? What is your log level setting? Is there any particular log that is filling it up?
I never changed anything logging related in foreman from the defaults. It is set to INFO currently.
So far I cannot see anything out of the ordinary. The production.log did not get rotated in ages it seems - 2024 was the last time.
I rotated the log manually and will monitor the situation.
# settings.yml
# Log settings for the current environment can be adjusted by adding them
# here. For example, if you want to increase the log level.
:logging:
:level: info
:production:
:type: file
:layout: multiline_request_pattern
# Individual logging types can be toggled on/off here
:loggers:
# Foreman telemetry has three destinations: prometheus, statsd and rails log.
:telemetry:
# prefix for all metrics
:prefix: 'fm_rails'
# prometheus endpoint is at /metrics
# warning: ruby client library currently does not supprt multi-process web servers
:prometheus:
:enabled: false
# works with statsd_exporter too, use the rake task to generate config
:statsd:
:enabled: false
# IP and port (do not use DNS)
:host: '127.0.0.1:8125'
# one of 'statsd', 'statsite' or 'datadog'
:protocol: 'statsd'
# Rails logs end up in logger named 'telemetry' when enabled
:logger:
:enabled: false
# logging level as in Logger::LEVEL
:level: 'DEBUG'
This thread inspired me to check my own, and I discovered logs haven’t been rotated since I leapped 8 to 9 in September. I think logrotate must’ve been changed from a cronjob to a systemd timer that was never enabled.