package com.boissinot.jenkins.csvexporter.batch.aspect;

import com.boissinot.jenkins.csvexporter.batch.JobItemProcessor;
import com.boissinot.jenkins.csvexporter.domain.InputSBJobObj;
import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;

/**
 * @author Gregory Boissinot
 */
@Component
@Aspect
public class JobItemProcessorLogger {

    private final Logger logger = LoggerFactory.getLogger(JobItemProcessor.class);

    @Pointcut("within(com.boissinot.jenkins.csvexporter.batch.JobItemProcessor) && args(com.boissinot.jenkins.csvexporter.domain.InputSBJobObj)")
    private void logger() {
    }

    @Before(value = "logger()")
    private void logCurrentJob(JoinPoint joinPoint) {
        InputSBJobObj inputSBJobObj = (InputSBJobObj) joinPoint.getArgs()[0];
        logger.info(String.format("Processing '%s'", inputSBJobObj.getJobName()));
    }
}

@@ -182,43 +182,8 @@
 bj;%0A
-import org.aspectj.lang.JoinPoint;%0A
 impo
@@ -687,59 +687,13 @@
 rgs(
-com.boissinot.jenkins.csvexporter.domain.InputSBJob
+input
 Obj)
@@ -719,16 +719,38 @@
  logger(
+InputSBJobObj inputObj
 ) %7B%0A    
@@ -780,16 +780,24 @@
 %22logger(
+inputObj
 )%22)%0A    
@@ -827,108 +827,33 @@
 Job(
-JoinPoint joinPoint) %7B%0A        InputSBJobObj inputSBJobObj = (InputSBJobObj) joinPoint.getArgs()%5B0%5D;
+InputSBJobObj inputObj) %7B
 %0A   
@@ -907,21 +907,16 @@
 %22, input
-SBJob
 Obj.getJ

Improve aspect