You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.
Activity
JakeQZ commentedon Feb 14, 2024
Would using
psr/logallow us to provide a 'null' logger by default, possibly meaning we don't need to actually additionally provide an on/off switch?oliverklee commentedon Feb 14, 2024
Yes,
psr/logprovides aNullLoggerwhich we can use: https://github.com/php-fig/log/blob/master/src/NullLogger.phpFor the non-null logger, we can extend
https://github.com/php-fig/log/blob/master/src/AbstractLogger.phpwith our ownSimpleLogger(or something along the lines) so people don't need to implement their own logging for simple debugging.[FEATURE] Add support for PSR/Log
[FEATURE] Add support for PSR/Log
[FEATURE] Add support for PSR/Log
[FEATURE] Add support for PSR/Log
[FEATURE] Add support for PSR/Log
[FEATURE] Add support for PSR/Log