Hybris Runtime Development Tools: hybris Logging


Starting version 6.0 SAP changed the architecture of the hybris logging subsystem. Hybris uses the Apache Log4j 2 logging framework that is configured differently in hybris. Any changes in the logging configuration are applied only if the server is restarted.

Starting hybris 6.0 the architecture of Hybris Administrative Console (HAC) was changed. As a consequence, the logging configuration capabilities were restricted. For example, in the previous versions, you were able to change a log level for all the beans defined in the system (thousands of items). For reasons that remain a mystery to me, in hybris 6.0/6.1  HAC shows the root loggers only, numbering 14 items.

For example, according to the documentation, if you want to turn the logging  on for  de.hybris.platform.jalo.flexiblesearch.FlexibleSearch with the logLevel = WARN, you need to add the following fragment to the configuration file (this example is for the property configuration file):

log4j2.logger.hmc.name =  de.hybris.platform.jalo.flexiblesearch.FlexibleSearch
log4j2.logger.hmc.level = warn
log4j2.logger.hmc.appenderRef.stdout.ref = STDOUT


Logging is a very efficient tool for troubleshooting, so I was really embarrassed to wait every single time I need to add or change the logging settings. It is very annoying.

So I had taken up the challenge of creating the logging tool which simplifies the common log operations and management.


Usage examples

Display hybris log (like tail -f). 


or (for non-wrap output)

./noWrap ./hybrisLog


You can use the filters (grep, egrep) or data processors (awk, perl) to make the log more focused on the problem you deal with:

./hybrisLog | grep "[FlexibleSearch]" | grep -i "{ContentPage}"

Show all classes that loggable (have registered in Apache Log4J).

./hybrisLog -a

There are thousands of classes in the output, so you can use the filters to narrow them:

./hybrisLog -a | grep "FlexibleSearch"


Show all custom log configurations. If you change the default logging configuration (by using the utility or changing the local.property file), the list of the custom configuration will be changed too.

./hybris -l


Change log level for the specified class/package (full qualified class name or the package name):

./hybris -c <classOrPackage> -ll <logLevel>


./hybrisLog.sh -c de.hybris.platform.jalo.flexiblesearch.FlexibleSearch -ll INFO

./hybrisLog.sh -c de.hybris.platform.solrfacetsearch.indexer -ll DEBUG

Please note, that the last command performs a bulk change, for all classes that are in the de.hybris.platform.solrfacetsearch.indexer package:




  1. Hi, do you know if it’s possible to upgrade hybris 5.7 log4j to version 2? It would help here with our logging needs, thanks.

    Liked by 1 person

    1. Unfortunately, I didn’t face to this task before


  2. Ashwan Guni · · Reply

    Hi Rauf,

    Where can I find the logging tool you developed


    1. Send a request to me please, Rauf_aliev@epam.com


  3. Vadim Chernov · · Reply

    For changing Log Level you can use script in HAC Scripting Languages Console (Groovy) without any additional code and etc


    import org.apache.logging.log4j.LogManager;
    import org.apache.logging.log4j.Level;

    String logName = “de.hybris.platform.solrfacetsearch.indexer.cron.SolrIndexerJob”;
    String logLevel = “DEBUG”;




    1. I have published the similar recently. Look for the articles tagged with “groovy”. Thanks


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: