[MAGNOLIA-6959] DefinitionProviderProblemLogger does not log problems in developer mode Created: 17/Feb/17  Updated: 17/Dec/21  Resolved: 16/Dec/21

Status: Closed
Project: Magnolia
Component/s: configuration
Affects Version/s: 5.5, 6.2.1
Fix Version/s: 6.2.15

Type: Bug Priority: Neutral
Reporter: Markus Jeni Assignee: Thuy To
Resolution: Fixed Votes: 5
Labels: maintenance, quickwin
Remaining Estimate: 1h
Time Spent: 3d 7h
Original Estimate: 5m

Attachments: Text File DefinitionProviderProblemLogger.java.patch     PNG File image-2021-12-10-11-28-44-791.png    
Template:
Patch included:
Yes
Acceptance criteria:
Empty
Task DoD:
[X]* Doc/release notes changes? Comment present?
[X]* Downstream builds green?
[X]* Solution information and context easily available?
[X]* Tests
[X]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:
Sprint: Global Maintenance 3
Story Points: 2

 Description   

The described behaviour of DefinitionProviderProblemLogger is "Severe problems are always logged, whereas major and minor ones are only printed if isInDeveloperMode is set to true, otherwise only the amounts are printed.". But there is no logging in developer mode, only the amounts.

This is because there is a ! (not) in front of the condition:
if (!isInDeveloperMode) {



 Comments   
Comment by Marc Johnen [ 15/Mar/21 ]

Still the same in 6.2.5, it would take a minute to fix.

Comment by Markus Jeni [ 23/Aug/21 ]

6.2.9 same. Does no one use problem output in the console in dev. mode?! Can't believe.

Comment by Marc Johnen [ 23/Aug/21 ]

Yes, logging would be nice, since the Definitions-App is also quite unstable and crashes on some of definition errors and then remains unusable.  

This ticket is just four years old, so no need to loose hope .
But there is a patch and you can build it yourself.

Comment by Thuy To [ 10/Dec/21 ]

Hi mjeni ,

I'm a little confused on ticket:

The current behavior: (!isInDeveloperMode) That means log when it is in production mode
With this fix (isInDeveloperMode): Should we only log when it is in develop mode and not in production mode?

Please help me verify if I'm wrong.

Thanks  :bow:

Comment by Markus Jeni [ 10/Dec/21 ]

In my opinion errors in definitions should only be logged in dev mode. Errors in definitons shoud never go live to a production environment. If so, QA failed. In a production environment server administrators are not interested in definition errors in cms logfiles.

Comment by Thuy To [ 13/Dec/21 ]

Thank you for your comments.

Comment by Thuy To [ 15/Dec/21 ]

Updated code and fixed the issue for ce and dx-core. Thank you.

Generated at Mon Feb 12 04:19:26 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.