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_sizeconfig 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: