In one of the projects we're using TCPDF to parse PDF files and extract text from them. Somewhere in the middle that library does
@gzuncompress($text). Problem here is that:
- nobody knows if text is compressed initially
- if function returns FALSE (which also triggers a notice) then text is considered to be not compressed and is used as is
- the error is suppressed by
The System Log enforces good coding practices by ignoring error suppression and logging that error anyway.
- don't log errors from 3rd party libraries to System Log
- log Fatal Error/Exception regardless of their origin
add [suppressed] before error message for errors from In-Portal that developer was trying to suppress
We can filter out non-In-Portal error using following:
- file path in error is not within FULL_PATH
- file path in error is within FULL_PATH . '/vendor'
- file path in error is within FULL_PATH . '/modules', but name of module isn't registered in Modules database table
- [system log] The silenced errors should not be logged to System Log [5.2.2-B1]
- [system log] Don't log errors, that originate from 3rd party libraries v2 [5.2.1]