[MGNLCE-149] Colorize log levels written to the console Created: 25/Sep/18  Updated: 16/Apr/20

Status: Accepted
Project: Community Edition
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Neutral
Reporter: Martin Drápela Assignee: Adam Siska
Resolution: Unresolved Votes: 4
Labels: maintenance, quickwin
Remaining Estimate: 0d
Time Spent: Not Specified
Original Estimate: 0d

Attachments: PNG File image-2018-09-25-10-40-04-505.png     PNG File image-2019-06-06-08-45-00-463.png     PNG File image-2019-06-06-08-45-16-251.png    
Issue Links:
supersession
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)
Date of First Response:
Story Points: 1

 Description   

With this tiny tweak we'll get color-differentiated log4j message levels in the console:

Howto:

In /webapps/magnoliaAuthor/WEB-INF/config/default/log4j2.xml

use the %highlight wrapper in the pattern of the PatternLayout tag:

<PatternLayout pattern="%d %highlight{%-5p} %-50.50c: %m%n"/>


 Comments   
Comment by Antti Hietala [ 25/Jan/19 ]

Sounds like a great idea. Make sure it doesn't look worse on Windows.

Comment by Adam Siska [ 06/Jun/19 ]

Unfortunately it does look worse on Windows:

Generated at Mon Feb 12 00:06:44 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.