This introduces a logger mechanism and a new data/log directory. This is
a first proof of concept. It's built on top of the new global error
handling mechanism
Things to discuss:
* should we adopt PSR-3 somehow? if yes, how and should plugins be able
to drop-in other psr3 loggers?
* how to configure which facilities shall be logged?
* should we implement a log deletion feature?
* is the log format sensible?
* should we implement a log viewer admin plugin?
* should logging trigger events (it should maybe replace the
deprecation event)
We can't catch some errors and they are not passed to the error_handler
either. But we can at least react to them in a shutdown function to show
a friendly message to the user and write our log.
Now all important places where plugins are loaded are guarded by a
try/except. We're catching Throwables here to be able to catch stuff
like syntax errors early on (otherwise they will only be caught by our
ErrorConverter much too late). This means that this change requires PHP
7.0 minimum!
This looks at filenames and classes involved in the stacktrace to see if
a plugin is referenced.
We're only guessing plugins here, because looking for templates may
cause false positives where templates load plugins.
This transfers old style PHP errors into Exceptions and installs a
global exception handler. All exceptions caught by this handler are
logged to an error log and a meassage is shown to the end user. This
should finally get rid of "blank page" bug reports.