Created
October 17, 2014 17:39
-
-
Save gabanox/752fcdbb0b7f124287e8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.telcel.aspects; | |
import org.aspectj.lang.annotation.AfterThrowing; | |
import org.aspectj.lang.annotation.Aspect; | |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; | |
import org.springframework.stereotype.Component; | |
@Component | |
@Aspect | |
public class ExceptionLoggingAspect extends CallTracker { | |
Logger logger = LoggerFactory.getLogger(ExceptionLoggingAspect.class); | |
@AfterThrowing(pointcut = "SystemArchitecture.Repository() || SystemArchitecture.Service()", throwing = "ex") | |
public void logException(Exception ex) { | |
trackCall(); | |
logger.error("Exception", ex); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment