Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log rotations for psconfig-pscheduler-agent and psconfig-grafana-agent do not work due to incorrect setting #151

Open
ueno-icepp opened this issue Dec 23, 2024 · 0 comments

Comments

@ueno-icepp
Copy link

After updating perfsonar from 5.0.7 to 5.1.3, psconfig-pscheduler-*.log and psconfig-grafana-*.log file are not rotated.

Log rotation settings (maxBytes and backupCount) are defined in pscheduler-agent-logger.conf and grafana-agent-logger.conf under /etc/perfsonar/psconfig/.
However, the python logging module does not read this configuration.

[handler_fileRotateTransaction]
class=handlers.RotatingFileHandler
level=DEBUG
formatter=patternLayout 
maxBytes=16777216       <= not read by logging module
backupCount=7           <= not read by logging module
args=('/var/log/perfsonar/psconfig-pscheduler-agent-transactions.log', 'a')

After defining maxBytes and backupCount parameters to args(), log rotation was started.

[handler_fileRotateTransaction]
class=handlers.RotatingFileHandler
level=DEBUG
formatter=patternLayout 
args=('/var/log/perfsonar/psconfig-pscheduler-agent-transactions.log', 'a', 16777216, 7)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Ready
Development

No branches or pull requests

1 participant