Clear Log file via web

Hi,

I think there should be an option to clear server log file via web.

7 Likes

I agree, especially after fixing a config error that spammed messages and makes you force to check the timestamp instead of just enjoying a clear log.

2 Likes

Yes i want that too, thats ridiculous.
-rw-r----- 1 www-data www-data 8,5G Okt 4 09:53 nextcloud.log

@JasonBayton is there any chance to get to such thing?
Or a logrotate might mitigate that too.

Sound suggestion!

@nickvergessen @MorrisJobke @blizzz @LukasReschke

@all add this as a feature request on GH: https://github.com/nextcloud/server/issues

log rotation is already possible:

2 Likes

nice thanks, how much files will be generated, until they will be overwritten?

Thanks for the heads-up :slight_smile:

Up to now I though we keep all files.
But apparently it always moves nextcloud.log to nextcloud.log.1 instead of the next number, so if you set a limit of 1 MB your server will keep 1-2 MB with rotation (the current one (0-1MB) and the previous one (~1MB)

with 1 MB/file i would have 8 500 logfiles :smiley: so a clear all function would be still nice.

2 Likes

In fact 2, because it always replaces nextcloud.log.1 as per above.
Also a clear button is not possible, because that would “break” features like our auditing log, when any admin is able to clear the log file.

2 Likes

ak ok, that is fine if I can limit the generation size in that way.

Hello @nickvergessen

Is this behaviour still the same now?

Thanks.

Furthermore, if my config.php file doesn’t specify a log_rotate_size the default is 100MB?

yes

yes

Post must be 10 characters long…