1
votes

Wanted to enable Hybris Admin console log so that it will give visibility regarding query ran from hac.

I can do it via adding a manual entry in the logging with the below property. de.hybris.platform.hac.facade.impl.DefaultFlexibleSearchFacade =DEBUG.

--> How I can enable this property permanently so that configuration won't get changed by new deployment.

I have tried to update via groovy but it seems groovy is not adding for this OOB class, for custom class working perfectly.

import com.tstcore.util.cluster.groovy.GroovyScriptClusterEvent

def logLevel = 'DEBUG'

def classes = [
'de.hybris.platform.hac.facade.impl.DefaultFlexibleSearchFacade'
]

classes.each{cls ->
def script = 'import org.apache.logging.log4j.LogManager\n'+
'import org.apache.logging.log4j.Level\n' +
'def log = LogManager.getLogger(' + cls + '.class)\n' +
'log.level = Level.' + logLevel +'\n' +
'println log\n'

def event = new GroovyScriptClusterEvent(script)

eventService.publishEvent(event)
}
1

1 Answers

1
votes

You can add it to local.properties, like this:

log4j2.logger.CustomName.name=de.hybris.platform.hac.facade.impl.DefaultFlexibleSearchFacade
log4j2.logger.CustomName.level=DEBUG
log4j2.logger.CustomName.additivity=false
log4j2.logger.CustomName.appenderRef.stdout.ref=STDOUT