nextcloud / files_fulltextsearch

🔍 Index the content of your files
GNU Affero General Public License v3.0
59 stars 30 forks source link

Don't log full stacktrace if generateDocument fails #139

Closed R0Wi closed 2 years ago

R0Wi commented 3 years ago

Current situation If we trigger an index build (for example sudo -u www-data php occ fulltextsearch:index) every Exception inside generateDocument is logged into nextcloud.log with the complete stacktrace. Because the stacktrace contains a lot of data object and every object inside the stacktrace is serialized i noticed that one log entry can have about 400kb of size. If there are a few documents which cannot be indexed this bloats the logfile with unneccessary information and slows down the indexing process.

This PR This pull request strips out the stacktrace and narrows the log data down to the relevant information.