Commit Graph

14 Commits

Author SHA1 Message Date
Andreas Gohr fe15e2c063 code style: static visibility 2023-08-31 22:42:02 +02:00
Andreas Gohr dccd6b2bba coding style: function call spacing 2023-08-30 18:41:45 +02:00
Andreas Gohr 74981a4e68 apply PSR-12 constant visibility rule
PSR-12 says constants need their visibility declared from PHP 7.1
onwards
2023-08-30 13:02:49 +02:00
Andreas Gohr 24870174d2 Apply rector fixes to the rest of inc 2023-08-29 19:42:15 +02:00
Andreas Gohr 6c6732d6a0 output log messages to STDERR during unit testig
This is especially helpful to notice deprecation messages
2022-08-14 18:06:38 +02:00
Andreas Gohr 25edeeca14 log deprecation messages independent from allowdebug
Only the logging configuration should influnece if deprecation messages
are to be logged. By default they should be logged.
2022-08-14 17:07:41 +02:00
Andreas Gohr baa301e284 correctly create log file name. fixes #3699
strtoftime does not always recognize Unix Timestamps
2022-06-29 19:03:32 +02:00
Andreas Gohr 4b64792008 Ignore missing event system in logging #3614 2022-01-30 17:28:16 +01:00
Andreas Gohr 555e8b0078 Logger: add event to intercept and change the logged data
In some environments you may want to have logs but not have them stored
in the default location or may want a different logging format.

This event allows plugins to do that.
2022-01-10 15:33:12 +01:00
Damien Regad a8f9f939d4 Fix array access on null in Logger.php
Fixes #3391
2021-01-26 23:39:35 +01:00
Andreas Gohr cad4fbf6e2 added logging configuration
Log facitlities can now be disabled. By default only debug is disabled.
It might make sense to by default disable deprecated as well?

Debug logging is now independend of the allowdebug method. allowdebug
was often used in two ways: for displaying errors directly to the user
and for logging to the debug log. Now it only controls the former.
2020-08-13 20:28:52 +02:00
Andreas Gohr c205039322 added convenience methods to log to our default facilities 2020-08-13 20:03:41 +02:00
Andreas Gohr 70cc2cbf41 added logviwer admin plugin
This allows for easy viewing of the available logs.

The log format was sligthly adjusted again for easier parsing.
2020-08-13 19:48:45 +02:00
Andreas Gohr 0ecde6ce23 central logging mechanism
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)
2020-08-13 13:28:40 +02:00