Nextcloud.log file empty

Hi there,

can anyone tell me why my nextcloud.log file ist empty?

Nothing to log? Which loggrade, debug?

I had the same problem.

Check your config.php; I think your nextcloud write in syslog. Change it in nextcloud.log and then its works.

“log_type” => “nextcloud”,
“logfile” => “nextcloud.log”,
“loglevel” => “3”,
“logdateformat” => “F d, Y H:i:s”,

you mean i should at this lines you are added?

Can you please upload your config.php here and tell me please the path of your nextcloud (for example: /var/www/html/nextcloud). Please make personal content unrecognizable.

Please add the following lines to your Config.php
Please note that your path must be changed accordingly!
You can remove nextcloud.log in your data-folder. The config.php generated a new nextcloud.log.

2020-03-06%2011_20_46-Window

I changed my config.php as you mentioned and after that i get 2 errors when i refresh the logs on the web client.

Error PHP Trying to access array offset on value of type null at /var/www/html/nextcloud/apps/logreader/lib/Log/LogIterator.php#78

Both of them is this error and i only get it when i refresh the log page.
Any idea what could be wrong?

HI, i have the same error after migrate NC 19.0.3.
Any idea how to resolve?
thanks

Hi, yesterday I just migrated from an old server to a new server, with nextcloud 27,0,2,1 running on apache2 2.4.57-2 on debian 12. I had the same problem of empty data/nextcloud.log . This thread is on top of my google search. I tried enis45’s suggestion with full absolute path, but the nextcloud.log file in the data/ directory was still empty.

Then I tried ‘logfile’ => ‘nextcloud.log’ and from bash I typed ‘find /var/www/nextcloud -iname nextcloud.log’ then I found the log file working correctly beneath the /var/www/nextcloud/ directory and an empty nextcloud.log beneath the /var/www/nextcloud/ocs/ directory.

In short, use relative path, and look for the log file not beneath the data/ directory but at the root directory of nextcloud. Hope this helps.