Hello!
I have a problem with the size settings of the logging file in the data folder on the server. I am following the instructions, according to the following sources:
https://docs.nextcloud.com/server/20/admin_manual/configuration_server/occ_command.html
I also checked the information from reliable sources that the maximum size of this file is 100 MB by default.
But despite all this information, the size of the logging file is growing more and more, exceeding the above-mentioned factors and settings.
Based on this, the question is: what exactly and how should I do to set the parameter for configuring the size of the logging file, that is, its rotation?
My configuration file:
<?php
$CONFIG = array (
'instanceid' => 'ocrz2kpko6i9',
'passwordsalt' => 'sv9SxNQLhWdVY4o4FxBBDXTmb9a9f6',
'secret' => 'LYEXp4v8tQzVM4m5H4Pgc4NpEaA5e2DGKcV4vfNoHD8O8mgv',
'trusted_domains' =>
array (
0 => 'nextcloud',
),
'datadirectory' => '/var/www/nextcloud/data',
'dbtype' => 'mysql',
'version' => '27.1.3.2',
'overwrite.cli.url' => 'http://nextcloud/nextcloud',
'dbname' => 'znextclouddb',
'dbhost' => 'localhost',
'dbport' => '',
'dbtableprefix' => 'oc_',
'mysql.utf8mb4' => true,
'dbuser' => 'ea',
'dbpassword' => 'flvw003',
'installed' => true,
'log_query' => false,
'log_type' => 'file',
'logfile' => '/var/www/nextcloud/data/audit.log',
'logfilemode' => 0640,
'loglevel' => '0',
'log.condition' => [
'apps' => ['admin_audit'],
],
'logfile_audit' => '/var/www/nextcloud/data/audit.log',
'logdateformat' => 'F d, Y H:i:s',
'logtimezone' => 'Europe/Moscow',
'log_rotate_size' => 10485760,
);
My request for parameter settings in the console:
sudo -u www-data php /var/www/nextcloud/occ log:file --rotate-size=10MB
[sudo] password for ea:
Log backend file: enabled
Log file: /var/www/nextcloud/data/nextcloud.log
Rotate at: 10 MB
sudo -u www-data php /var/www/nextcloud/occ log:file
[sudo] password for ea:
Log backend file: enabled
Log file: /var/www/nextcloud/data/nextcloud.log
Rotate at: 10 MB
And also, in addition to my question, I want to ask another one. Can I receive events from logs in real time in turn so that they come as push notifications not to the server, but to another remote machine?