NethServer Version: NethServer release 7.3.1611 (Final)
Module: Nextcloud v12
In my Nextcloud under the Admin panel > Logging. I’ve set logging to include debug.
Is there a way to clear Nextcloud logs? I’m testing OnlyOffice connecting to my Nextcloud and need to send Logs to OnlyOffice team. Currently my Nextcloud log is very large. I want to clear the log, retest my Nextcloud/OnlyOffice and hopefully capture the necessary errors in the log to send.
Is there a way to clear the log in Nextcloud to reduce the amount of noise/history I currently displayed in logging?
Sorry for late reply. Probably you don’t need it anymore. Anyhow…
Other system logs are rotated using logrotate, but nextcloud.log has not been configured to use it. @greavette, is it worth?, could this be a new feature request for the @dev_team ?
Nextcloud has it’s own log rotation mechanism, handled by the
log_rotate_size config parameter, which should serve your purpose.
I have tried it with the default Nethserver Nextcloud package, and the log was not rotated.
IMO it would be better to rotate the logs rather than clear or delete them. But here are two ways to clear it:
truncate /var/lib/nethserver/nextcloud/nextcloud.log --size 0
Sorry for the late response, I noticed a while ago that the log is not rotated.
What about adding a logrotate config for it?
@greavette @dnutan would you like to try?
In nethserver-testing repo, thanks to @Sebastian: