You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Ignite TC Bot (Jira)" <ji...@apache.org> on 2022/09/06 07:16:00 UTC

[jira] [Commented] (IGNITE-17442) Colorize Ignite test console output

    [ https://issues.apache.org/jira/browse/IGNITE-17442?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17600633#comment-17600633 ] 

Ignite TC Bot commented on IGNITE-17442:
----------------------------------------

{panel:title=Branch: [pull/10229/head] Base: [master] : No blockers found!|borderStyle=dashed|borderColor=#ccc|titleBGColor=#D6F7C1}{panel}
{panel:title=Branch: [pull/10229/head] Base: [master] : No new tests found!|borderStyle=dashed|borderColor=#ccc|titleBGColor=#F7D6C1}{panel}
[TeamCity *--&gt; Run :: All* Results|https://ci2.ignite.apache.org/viewLog.html?buildId=6595687&amp;buildTypeId=IgniteTests24Java8_RunAll]

> Colorize Ignite test 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
>         Attachments: IgniteDebugLayoutConverter.java, dark-console-50-nodes-colors-palette.png, light-console-50-nodes-colors-palette.png, light-console.jpg, log4j2-test.xml, prod-propsal.png
>
>          Time Spent: 10m
>  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).
> !prod-propsal.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)