CRM and CX Blogs by Members
Find insights on SAP customer relationship management and customer experience products in blog posts from community members. Post your own perspective today!
Showing results for 
Search instead for 
Did you mean: 
Active Contributor
Colored logging lets you see different colors for different log levels in your local development console. An ERROR log may be displayed using red text. A WARN log may be displayed using yellow text, while an INFO log may be displayed using green text. This is useful if you are monitoring the logs while using the SAP Commerce application at the same time. You can see the errors quickly.

For MacOS (and possibly other Linux distributions), colored logging can be easily enabled by setting the ansi.colors property to true in For Windows, additional steps need to be done. The SAP Help Portal already has a guide for Colored Logging in Console. However, it's somewhat incomplete. So, in this guide, I'll fill in the missing parts.


The following software was used for this guide, though other versions may also work:

  • Windows 10 Home 19041.329

  • SAP Commerce 1905.15

  • Jansi 1.18. This is the Java library that colors your console using ANSI escape sequences.

Other assumptions:

  • You already have a working SAP Commerce set-up. i.e. configuration and initialization is already done


  1. Download the Jansi jar file from:
    As of this writing, the latest version is 1.18.
    NOTE: Clicking on the link to the jar file in the site gives you a "501 HTTPS Required" error. This is because of a change in January 2020: The Central Repository is Moving to HTTPS. The Jansi site needs to update its URLs. This HTTPS link should work:

  2. Copy the jar file to: hybris\bin\platform\tomcat\lib

  3. In, add this property:

  4. Start Hybris.


After you've done all those 4 steps, you should now have a colorful console. Watching the logs for errors will now be easier, especially if you have a 2-monitor setup with the console in one monitor and the web application in the other.


To change the color of the different log severities, configure log4j2.appender.console.layout.pattern in, and set the colors for the different log levels. Example:
log4j2.appender.console.layout.pattern=%highlight{%-5p [%t] %X{RemoteAddr}%X{Tenant}%X{CronJob}[%c{1}] %m%n}{FATAL=bright red, ERROR=red, WARN=yellow, INFO=green, DEBUG=cyan, TRACE=white}

Choose from the following colors: black, red, green, yellow, blue, magenta, cyan, and white. If you want a brighter color, add "bright", like "bright green".

To change the format or pattern of the log, refer to the Log4j PatternLayout guide:
Labels in this area