# Nextcloud 26.0.0 do not write logfile

**URL:** <https://help.nextcloud.com/t/nextcloud-26-0-0-do-not-write-logfile/163056>\
**Category:** ℹ️ Support\
**Created:** [May 29, 2023, 9:22am UTC](https://help.nextcloud.com/t/nextcloud-26-0-0-do-not-write-logfile/163056 "2023-05-29T09:22:11Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![infoatd](https://help.nextcloud.com/letter_avatar/infoatd/32/5_5575768a8748004e209b776fc1b2916d.png) [@infoatd](https://help.nextcloud.com/u/infoatd)\
**Post date:** [May 29, 2023, 9:22am UTC](https://help.nextcloud.com/t/nextcloud-26-0-0-do-not-write-logfile/163056/1 "2023-05-29T09:22:11Z")

</div>

> **Support intro**
>
> Sorry to hear you’re facing problems 🙁
> 
> _**[help.nextcloud.com](http://help.nextcloud.com) is for home/non-enterprise users. If you’re running a business, paid support can be accessed via [portal.nextcloud.com](http://portal.nextcloud.com) where we can ensure your business keeps running smoothly.**_
> 
> In order to help you as quickly as possible, before clicking **Create Topic** please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:
> 
> ```
> example
> 
> ```
> 
> Or for longer, use three backticks above and below the code snippet:
> 
> ```auto
> longer
> example
> here
> 
> ```
> 
> Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can ❤

Nextcloud version _(eg, 20.0.5)_: `26.0.0`  
Operating system and version _(eg, Ubuntu 20.04)_: `rocky 9`  
Apache or nginx version _(eg, Apache 2.4.25)_: `2.4.53`  
PHP version _(eg, 7.4)_: `8.0.27`

The issue you are facing:

Is this the first time you’ve seen this error? _(Y/N)_: N

Steps to replicate it:

1. configure log as logfile in config.php
2. restart httpd
3. admire the empty logfile

The output of your Nextcloud log in **Admin \> Logging** :

```auto
THERE IS NO LOGS

```

The output of your config.php file in `/path/to/nextcloud` (make sure you remove any identifiable information!):

```auto
  'logtimezone' => 'Europe/Paris',
  'log_type' => 'file',
  'logfile' => 'nextcloud.log',
  'loglevel' => '3',

```

The output of your Apache/nginx/system log in `/var/log/ ____ `:

```auto
not relevant here

```

not relevant here

```auto

Output errors in nextcloud.log in /var/www/ or as admin user in top right menu, filtering for errors. Use a pastebin service if necessary.

NO LOGS

```

---

<div class="post-metadata">

**Author:** ![infoatd](https://help.nextcloud.com/letter_avatar/infoatd/32/5_5575768a8748004e209b776fc1b2916d.png) [@infoatd](https://help.nextcloud.com/u/infoatd)\
**Post date:** [May 29, 2023, 9:32am UTC](https://help.nextcloud.com/t/nextcloud-26-0-0-do-not-write-logfile/163056/2 "2023-05-29T09:32:43Z")

</div>

Hi friends. Hope everyone is doing well.

I got this issue today i really feel dumb about it.

i double checked the location of the file with :

`sudo -u apache php /var/www/html/nextcloud/occ log:file`

```auto
Log backend file: enabled
Log file: nextcloud.log
Rotate at: 100 MB

```

i found the log file

`find / -name nextcloud.log | xargs ls -lah`

`-rw-rw-rw-. 1 apache apache 0 May 29 10:58 /var/www/html/nextcloud/data/nextcloud.log`

at some point the conf worked but after adding the timezone it failed.  
So i removed this options and tried many other possibilities

the official documentation config :

```auto
"log_type" => "file",
"logfile" => "nextcloud.log",
"loglevel" => 3,
"logdateformat" => "F d, Y H:i:s",

```

this sub workaround config :

> [@Nextcloud Logfile Not in /var/log/nextcloud.log](https://help.nextcloud.com/t/nextcloud-logfile-not-in-var-log-nextcloud-log/2986):
>
> My config.php: \<?php $CONFIG = array ( 'instanceid' =\> '\*', 'passwordsalt' =\> '\*', 'secret' =\> '\*', 'trusted\_domains' =\> array ( 0 =\> '\*', 1 =\> '192.168.2.2', 2 =\> '192.168.178.30', ), 'datadirectory' =\> '/home/\*/nextcloud/nextcloud\_data', 'overwrite.cli.url' =\> 'https://\*/nextcloud', 'dbtype' =\> 'mysql', 'version' =\> '9.1.0.16', 'dbname' =\> 'nextcloud', 'dbhost' =\> 'localhost', 'dbport' =\> '', 'dbtableprefix' =\> 'oc\_', 'dbuser' =\> 'nextcloud', 'dbpa…

nothing works anymore but it worked at some point that’s why i’m puzzled.

am i missing an obvious point here ?

SElinux is disabled.  
I cannot find the log which can tell me why logging doesn’t work.

Can some nexctloud wizard give me a hint here cause i feel so dumb about this.

Thank you very much and have a good day.

---

<div class="post-metadata">

**Author:** ![infoatd](https://help.nextcloud.com/letter_avatar/infoatd/32/5_5575768a8748004e209b776fc1b2916d.png) [@infoatd](https://help.nextcloud.com/u/infoatd)\
**Post date:** [May 29, 2023, 1:11pm UTC](https://help.nextcloud.com/t/nextcloud-26-0-0-do-not-write-logfile/163056/3 "2023-05-29T13:11:05Z")

</div>

i changed the config with this block :

```auto
  'log_type' => 'file',
  'logfile' => 'nextcloud.log',
  'loglevel' => 2,
  'logdateformat' => 'F d, Y H:i:s',
  'log.condition' =>
  array (
    'apps' =>
    array (
      0 => 'admin_audit',
    ),
  ),

```

i removed all logfiles with :

find / -name nextcloud.log | xargs rm

and immediately i can see all those logfile :

```auto
-rw-r-----. 1 apache apache 552 May 29 15:04 /srv/cloudata/nextcloud.log
-rw-r--r--. 1 apache apache 0 May 29 15:04 /var/www/html/nextcloud/nextcloud.log
-rw-r--r--. 1 apache apache 0 May 29 15:04 /var/www/html/nextcloud/ocs/nextcloud.log

```

i’m really puzzled how it works. it touch different files in different locations (i don’t get why) and those files apparently are read only or cannot be written by nextcloud.

---

<div class="post-metadata">

**Author:** ![wwe](https://help.nextcloud.com/user_avatar/help.nextcloud.com/wwe/32/72963_2.png) [@wwe](https://help.nextcloud.com/u/wwe)\
**Post date:** [December 14, 2024, 12:31pm UTC](https://help.nextcloud.com/t/nextcloud-26-0-0-do-not-write-logfile/163056/4 "2024-12-14T12:31:13Z")

</div>


