Skip to content

Conversation

@ArtificialOwl
Copy link
Member

Right now, if an app set the Lexicon Strictness to NOTICE or WARNING, 9 duplicate logs entries are generated when using

 ./occ config:app:set my_app abcd --value '123'
{
  "reqId": "Hdt7ARDAZhnhBLXiuhKj",
  "level": 1,
  "time": "2025-08-29T12:38:09+00:00",
  "remoteAddr": "",
  "user": "--",
  "app": "no app in context",
  "method": "",
  "url": "--",
  "message": "The app config key my_app/abcd is not defined in the config lexicon",
  "userAgent": "--",
  "version": "32.0.0.6",
  "data": []
}

Reason for that is that the key is used multiple time in the process.
The fix is to only print once and filters all similar reports

@ArtificialOwl ArtificialOwl requested a review from a team as a code owner August 29, 2025 12:47
@ArtificialOwl ArtificialOwl requested review from Altahrim, icewind1991 and provokateurin and removed request for a team August 29, 2025 12:47
Copy link
Member

@provokateurin provokateurin left a comment

Choose a reason for hiding this comment

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

Can you use some other key than the literal log message? 🙈

@ArtificialOwl
Copy link
Member Author

I had the same thought; the solution i had in mind was to send at least the key, or the app+key string, to the method and use it as index. adding some complexity to the code. And doing a checksum was overkill.

My own conclusion was that, at the same time, the code is deep into the loop and should not be executed that much.

But yes, I can; should I ?

Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
@ArtificialOwl ArtificialOwl force-pushed the fix/noid/limit-spam-on-strictness branch from 8f0e0b3 to 46ced9d Compare September 2, 2025 11:51
@ArtificialOwl
Copy link
Member Author

  • added limit also to IUserConfig
  • only use appid+key as index of array strictnessApplied[]

Copy link
Member

@AndyScherzinger AndyScherzinger left a comment

Choose a reason for hiding this comment

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

🐘

@provokateurin provokateurin merged commit a3183f7 into master Sep 2, 2025
235 of 246 checks passed
@provokateurin provokateurin deleted the fix/noid/limit-spam-on-strictness branch September 2, 2025 18:12
@AndyScherzinger AndyScherzinger added this to the Nextcloud 32 milestone Sep 2, 2025
@skjnldsv skjnldsv modified the milestones: Nextcloud 32, Nextcloud 33 Sep 28, 2025
@blizzz blizzz mentioned this pull request Oct 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants