Conditional logging#15965
Conversation
|
|
I used the internal |
|
Awesome stuff, logfiles often are so big and this really helps |
|
nice idea 👍 |
753c2db to
023734c
Compare
|
rebased after merge of #15958 |
|
@MorrisJobke unit tests are broken |
023734c to
0ad6ba7
Compare
|
I added a unit test for the app condition. |
|
@LukasReschke @nickvergessen @rullzer @Xenopathic Do you want to review? |
|
"want" |
* remove duplicate code from child classes
0ad6ba7 to
0d3fea2
Compare
|
Do we want to use a header or not? |
|
BTW: all the other comments are addressed. |
There was a problem hiding this comment.
Now doc and content is not the same anymore 🙈
There was a problem hiding this comment.
Oh ... forgot that one
* Log condition for log level increase based on conditions. Once one of these
conditions is met, the required log level is set to debug. This allows to
debug specific requests, users or apps
* Supported conditions (setting `log_condition` in `config.php`):
- `shared_secret`: if a request parameter with the name `log_secret` is set to
this value the condition is met
- `users`: if the current request is done by one of the specified users,
this condition is met
- `apps`: if the log message is invoked by one of the specified apps,
this condition is met
* fix unit test and add app log condition test
0d3fea2 to
e79c255
Compare
|
A new inspection was created. |
|
Refer to this link for build results (access rights to CI server needed): |
|
@LukasReschke @nickvergessen @rullzer @Xenopathic Ready for review :) |
|
Working very nice! As mentioned on IRC the call_user_func stuff makes me cry. But also that should be addressed in another PR. 👍 ! |
|
👍 |
Conditional logging

Log condition for log level increase based on conditions. Once one of these conditions is met, the required log level is set to debug. This allows to debug specific requests, users or apps
Supported conditions (setting
log_conditioninconfig.php):-
secret: if a request parameter with the namelog_secretis set to this value the condition is met-
users: if the current request is done by one of the specified users, this condition is met-
apps: if the log message is invoked by one of the specified apps, this condition is metThis would be really helpful to debug bigger installations where enabling a higher log level isn't a option because of the huge amount of log messages. cc @felixboehm @butonic
cc @nickvergessen @PVince81 @rullzer @Xenopathic @Raydiation @DeepDiver1975