Hello again! I faced the problem that log4j colorization doesn't work in the Windows console out of the box. To enable log4j colorization on Windows, the user must place the jansi library on the classpath and "disable" a special environment variable that forces log4j to skip loading this library by default [1].
After a little research, I came to the conclusion that including this library (jansi) in the ignite log4j2 distribution by default is not a good idea. Therefore, I prepared a patch that adds coloring for those platforms that support it out of the box [2]. For Windows users, I've added a note to the official Ignite documentation with a link how to set up log4j2 colorization for Windows. That is, for Windows users will not change anything with the default ignite-log4j.xml configuration - the output to the console will remain black and white. And if desired, they will be able to turn on the coloring according to the documentation. I also checked the test console output in IntelliJ IDEA under Windows and it works fine (with colorization) by default. I plan to merge these changes soon, if there are no objections. [1] https://logging.apache.org/log4j/2.x/manual/layouts.html#ANSI_Styling_on_Windows [2] https://github.com/apache/ignite/pull/10229/files пн, 12 сент. 2022 г. в 14:00, Anton Vinogradov <a...@apache.org>: > > Looks great! > > On Wed, Sep 7, 2022 at 2:57 PM Nikita Amelchev <namelc...@apache.org> wrote: > > > Pavel, Looks cool. > > > > +1 to add to the default log config. > > > > вт, 6 сент. 2022 г. в 13:20, Pavel Tupitsyn <ptupit...@apache.org>: > > > > > > Thanks for the explanation. > > > > > > Yes, I think we can apply the same color scheme everywhere, but let's > > hear > > > more opinions. > > > > > > On Tue, Sep 6, 2022 at 1:10 PM Pavel Pereslegin <xxt...@gmail.com> > > wrote: > > > > > > > Hello Pavel, > > > > > > > > I decided that it's safer to apply this only to our tests first, and > > > > then if everything is ok, apply the same logger pattern to the default > > > > production log4j-config, > > > > If you think it's worth applying them now to the production config - I > > > > can do it. > > > > > > > > вт, 6 сент. 2022 г. в 12:33, Pavel Tupitsyn <ptupit...@apache.org>: > > > > > > > > > > Looks great! > > > > > > > > > > However, I'm a bit confused - does it apply to node output in > > production > > > > > build? > > > > > Why does it say "test console output"? > > > > > > > > > > On Tue, Sep 6, 2022 at 12:20 PM Mirza Aliev <alievmi...@gmail.com> > > > > wrote: > > > > > > > > > > > Hello Pavel! Looks awesome! Thank you for the enhancement! > > > > > > > > > > > > вт, 6 сент. 2022 г. в 10:37, Pavel Pereslegin <xxt...@gmail.com>: > > > > > > > > > > > > > Hello Igniters! > > > > > > > > > > > > > > Recently completed Ignite migration to use log4j2 [1]. > > > > > > > Log4j2 supports ANSI colorization in the console [2], which can > > help > > > > > > > in parsing log output. > > > > > > > As an experiment, I would like to colorize the test console > > output > > > > [3]. > > > > > > > > > > > > > > The color palette is similar to spring boot, see light [4] and > > dark > > > > > > > [5] console output example. > > > > > > > > > > > > > > If there are no objections, I will merge these changes soon [6]. > > > > > > > > > > > > > > [1] https://issues.apache.org/jira/browse/IGNITE-16650 > > > > > > > [2] > > > > https://logging.apache.org/log4j/2.x/manual/layouts.html#Patterns > > > > > > > [3] https://issues.apache.org/jira/browse/IGNITE-17442 > > > > > > > [4] > > > > > > > > > > > > > > > > > > > https://issues.apache.org/jira/secure/attachment/13048986/light-console.jpg > > > > > > > [5] > > > > > > > > > > > > > > > > > > > https://issues.apache.org/jira/secure/attachment/13048991/dark-console-example.png > > > > > > > [6] https://github.com/apache/ignite/pull/10229/files > > > > > > > > > > > > > > > > > > > > > > > > > -- > > Best wishes, > > Amelchev Nikita > >