Logfile Customization

On owncloud 8.2.9 with php 7.0.33 , I get the the following log entry, that is messing up my logs as it comes very often.
{“reqId”:“XtZWw9cwGOVtODBDYRlaTAAAAEI”,“remoteAddr”:“xxxxxx”,“app”:“PHP”,“message”:“Function ldap_sort() is deprecated at /var/www/owncloud/apps/user_ldap/lib/ldap.php#264”,“level”:3,

I know that this is a PHP 7.0 warning, but I want to suppress the message at the moment as I’m preparing the server for an upgrade and it makes it hard to use the logs for debugging as most lines contain this error.
At the moment I find no way to suppress this message , even setting the loglevel to log “fatal issues only” does not stop the logging of this error.

Thanks for your help in advance

How about you just filter your logfiles with grep? Here is a simple oneliner:

grep -v "Function ldap_sort" /path/to/owncloud.log > filtered-owncloud.log

Edit: I just realised that there might also be further settings in your php.ini regarding this:

1 Like

HI enaubauer,

thanks for your answer.
yes, I think a filter is the best workaround at the moment.
I have already disabled the error reporting in PHP with no succes. Perhaps I must also disable the display errors in PHP.

1 Like