Logs & Reports > System Log" section is where all errors (errors, notices and warnings), that occurred during script run are being recorded. The section looks like this:
Note the "
Code" column that contains error code. At least for each PHP error (and there 15 of them according to http://php.net/manual/en/errorfunc.constants.php) has associated constant name (e.g.
E_STRICT in above screenshot). The MySQL has 60 of them (according to https://dev.mysql.com/doc/refman/5.5/en/error-messages-client.html). The developers know these PHP constants pretty well, because they use them. But code behind each error constant:
- isn't that easy to remember
- can change in different PHP versions
- change type of "
LogCode" column from integer to string
- update "
LogCode" column filter in grid
- when creating log record and code name is known, then write resolved code name write instead of actual code (for exceptions name would be exception class name)
- in the "
upgrades.sql" patch existing records in "
System Log" section where code is known upfront
- How it's done in MonoLog: https://github.com/Seldaek/monolog/blob/master/src/Monolog/ErrorHandler.php#L185-L218