[ 
https://issues.apache.org/jira/browse/IGNITE-17442?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Pavel Pereslegin updated IGNITE-17442:
--------------------------------------
    Summary: Colorize Ignite console output  (was: Colorize Ignite test console 
output)

> Colorize Ignite console output
> ------------------------------
>
>                 Key: IGNITE-17442
>                 URL: https://issues.apache.org/jira/browse/IGNITE-17442
>             Project: Ignite
>          Issue Type: Improvement
>            Reporter: Pavel Pereslegin
>            Assignee: Pavel Pereslegin
>            Priority: Major
>              Labels: test-framework
>             Fix For: 2.15
>
>         Attachments: IgniteDebugLayoutConverter.java, 
> dark-console-50-nodes-colors-palette.png, dark-console-example.png, 
> light-console-50-nodes-colors-palette.png, light-console.jpg, log4j2-test.xml
>
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> Recently completed Ignite migration to use log4j2. So we can use ["highlight" 
> conversion 
> pattern|https://logging.apache.org/log4j/2.x/manual/layouts.html#Patterns] to 
> colorize the output.
> Initial proposal for dark test console output (pretty similar to spring boot).
> !dark-console-example.png|width=679,height=337!
> light console output example
> !light-console.jpg|width=679,height=337!
> Pattern for log4j 2.18+
> {code:xml}
> <PatternLayout 
> pattern="%style{[%d{ISO8601}]}{#777777}%highlight{[%-5p]}{FATAL=red blink, 
> ERROR=red, WARN=yellow bold, INFO=green, DEBUG=green bold, 
> TRACE=blue}%style{[%t]}{magenta}%style{[%c{1}]}{cyan}%notEmpty{[%markerSimpleName]}
>  %m%n"/>
> {code}
> For the test framework, there is a suggestion - to color the output of each 
> node with its own color. Apparently this can't be done without adding your 
> own plugin, for example LogEventPatternConverter.
> h4. Update
> So far, it has been decided not to color the nodes in different colors.
> The main reason is that it is not very clear how to highlight the startup of 
> different nodes (in this case, logging occurs from the *main* thread).
> In the attachment, I left an example of coloring different thread-nodes in 
> different colors ( [^IgniteDebugLayoutConverter.java] ), which relies on the 
> fact that the node name is contained in the name of the thread that performs 
> logging.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to