Hybris cronjob logging

I have Job with logger (Slf4j) :

Job Class :

public class MyJob extends AbstractJobPerformable<CronJobModel>
    private static final Logger LOG = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass().getName());

    public PerformResult perform(CronJobModel cronJobModel)
         LOG.info("Test log);

I want this log to appear in the job log(in hmc). But it doesn’t exist there. But logger logs all stuff to console. Please see below my job Configuration

Job Configuration:

Job Configuration


The problem in your case is the type of logger which you use Logger(slf4j). So to get logs entries you need to use org.apache.log4j.Logger as your main Logger. Hybris recommaned org.apache.log4j.Logger as Log4j framework to use. So add this lines to your class :

  • import the package :
    import org.apache.log4j.Logger; 

Leave a Reply

Your email address will not be published. Required fields are marked *