Skip to Content
0
Aug 26, 2018 at 07:35 PM

logging control at class level

212 Views

Hello,

Hybris supports to control the log levels at class level. For exmaple If I write a new class (DefaultYsaperpreturnprocessService.java) then to controll the logs for that class from hac I need to define log details in the project.properties or local.properties and also the class should have the logger like this..

 private static final Logger LOG = Logger.getLogger(DefaultYsaperpreturnprocessService.class);

properties for the above class

log4j2.logger.helloController.name = com.sap.hybris.service.impl.DefaultYsaperpreturnprocessService

log4j2.logger.helloController.level = DEBUG

log4j2.logger.helloController.appenderRef.stdout.ref = STDOUT

If I am writing 10 classes do I need to define the log for each class like above in the properties file or is there some thing that i can define at package level so that all the classes will avaialble in HAC to control ?