nextcloud / nextcloud/ansible-collection-nextcloud-admin

add logrotation option

Open
#111 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
165
Forks
86
Avg merge
15d 13h
Merged PRs (30d)
1

Description

Hi,

awesome playbook, but i'd like to see a configurable option to add nextclouds internal logrotation. since nc14 or so it is enabled by default even if not listed in the config.php, but is set to 100MB as rotation breakpoint.

nextcloud-logs (the json log at data/nextcloud.log) is quite unreadable anyways, but if you'd like to have smaller logs (or if they remove that default somewhen) you'd want to have this configurable. the occ-command for this is as follows:
sudo -u www-data php /var/www/nextcloud/occ log:file --rotate-size 10MB
you can use human-readable sizes here, however, it goes as bytes to the config.php :
'log_rotate_size' => 10485760,
i'd try to add this by my self, but i'm still learning how to be good at especially idempotency :-)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by examining the playbook tasks that manage Nextcloud's config.php and the documented occ entry point sudo -u www-data php /var/www/nextcloud/occ log:file --rotate-size 10MB. Done should provide a configurable log-rotation size that results in the corresponding log_rotate_size value in config.php while remaining idempotent.

Written by the indexing model from the issue text.

Assessment

Tech stack
ansible
Domain
devops
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.