Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(log): Allow to combine log.conditions to only log (app&user) #45277

Merged
merged 1 commit into from
Jul 30, 2024

Conversation

nickvergessen
Copy link
Member

@nickvergessen nickvergessen commented May 13, 2024

Summary

Improve log conditioning to allow only debug logging entries for user & app, dedicated log level for each condition and "log message contains" additionally.

Checklist

@nickvergessen nickvergessen added this to the Nextcloud 30 milestone May 13, 2024
@nickvergessen nickvergessen self-assigned this May 13, 2024
lib/private/Log.php Outdated Show resolved Hide resolved
*
* Defaults to an empty array.
*/
'log.condition' => [
'shared_secret' => '57b58edb6637fe3059b3595cf9c41b9',
'users' => ['sample-user'],
'apps' => ['files'],
'matches' => [
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
'matches' => [
'and' => [

Or is that too nerdy?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
'matches' => [
'allof' => [

maybe?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had that at some point all ready, but my mind couldn't settle if it's allof or anyof and then I wondered if it's more understandable for people

lib/private/Log.php Outdated Show resolved Hide resolved
lib/private/Log.php Outdated Show resolved Hide resolved
lib/private/Log.php Outdated Show resolved Hide resolved
lib/private/Log.php Outdated Show resolved Hide resolved
lib/private/Log.php Show resolved Hide resolved
lib/private/Log.php Outdated Show resolved Hide resolved
lib/private/Log.php Outdated Show resolved Hide resolved
@nickvergessen nickvergessen force-pushed the techdebt/noid/log-condition-v2 branch from c83e80c to af25b5a Compare May 16, 2024 19:32
@blizzz blizzz mentioned this pull request Jul 30, 2024
Signed-off-by: Joas Schilling <coding@schilljs.com>
@nickvergessen nickvergessen force-pushed the techdebt/noid/log-condition-v2 branch from af25b5a to 710a69b Compare July 30, 2024 11:18
@nickvergessen nickvergessen enabled auto-merge July 30, 2024 12:28
@nickvergessen nickvergessen disabled auto-merge July 30, 2024 13:05
@nickvergessen nickvergessen merged commit 8760c8e into master Jul 30, 2024
167 of 170 checks passed
@nickvergessen nickvergessen deleted the techdebt/noid/log-condition-v2 branch July 30, 2024 13:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants