[MAGNOLIA-4513] Implement toString() on info.magnolia.cms.security.ACLImpl for log readability Created: 15/Aug/12  Updated: 02/Oct/12  Resolved: 26/Sep/12

Status: Closed
Project: Magnolia
Component/s: core
Affects Version/s: 4.5.4
Fix Version/s: 4.5.5

Type: Bug Priority: Trivial
Reporter: Magnolia International Assignee: Roman Kovařík
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* 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:

 Description   

Debug logs are filled with lines like this one:

2012-08-15 17:03:05,016 DEBUG info.magnolia.jaas.sp.jcr.JCRAuthorizationModule  : ACL: info.magnolia.cms.security.ACLImpl@59b5b945

This is quite meaningless. Two simple suggestions:
1) log the username (yes, it's log a few lines above, but if two users log in at the same time, you're lost)
2) implement toString() on info.magnolia.cms.security.ACLImpl so that this becomes useful. Since info.magnolia.cms.security.PermissionImpl already has a toString(), it should be straightforward - print out the name and the list of permissions of the ACL.

Additionally, you might want to make the log message a little more meaningful - i.e saying what's happening with that ACL (something like "adding ACL to user {}: {}" I guess?)



 Comments   
Comment by Roman Kovařík [ 02/Oct/12 ]

https://git.magnolia-cms.com/gitweb/?p=magnolia_main.git;a=commit;h=0ae10b70d95a4553f5cfaaa9475c43a59ab0cc9a

Generated at Mon Feb 12 03:56:30 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.