Add a debugging log
For every error that currently is throwing an exception or that is worked around using the lenient mode, we should log the problem, the line number and the corresponding CSS fragment (where it makes sense).
We should log this using a PSR-compatible logger and provide a simple default logger to Parser. It should be possible to override the logger from the outside (so people can plug in their own logging if they like).
We'll also need to psr/log to our dependencies.
It should also be possible to disable debugging in order to improve performance.
Would using psr/log allow us to provide a 'null' logger by default, possibly meaning we don't need to actually additionally provide an on/off switch?
Yes, psr/log provides a NullLogger which we can use: https://github.com/php-fig/log/blob/master/src/NullLogger.php
For the non-null logger, we can extend https://github.com/php-fig/log/blob/master/src/AbstractLogger.php with our own SimpleLogger (or something along the lines) so people don't need to implement their own logging for simple debugging.