Search in sources :

Example 1 with CloudPlatformRequest

use of com.sequenceiq.cloudbreak.cloud.event.CloudPlatformRequest in project cloudbreak by hortonworks.

the class LogContextAspects method buildLogContextForCloudPlatformEventHandler.

@Before("com.sequenceiq.cloudbreak.logger.LogContextAspects.interceptCloudPlatformEventHandlersAcceptMethod()")
public void buildLogContextForCloudPlatformEventHandler(JoinPoint joinPoint) {
    Event<CloudPlatformRequest> event = (Event<CloudPlatformRequest>) joinPoint.getArgs()[0];
    CloudPlatformRequest cloudPlatformRequest = event.getData();
    CloudContext cloudContext = cloudPlatformRequest.getCloudContext();
    buildMdcContext(cloudContext, event);
    LOGGER.info("A CloudPlatformEventHandler's 'accept' method has been intercepted: {}, MDC logger context is built.", joinPoint.toShortString());
}
Also used : CloudContext(com.sequenceiq.cloudbreak.cloud.context.CloudContext) Event(reactor.bus.Event) CloudPlatformRequest(com.sequenceiq.cloudbreak.cloud.event.CloudPlatformRequest) Before(org.aspectj.lang.annotation.Before)

Aggregations

CloudContext (com.sequenceiq.cloudbreak.cloud.context.CloudContext)1 CloudPlatformRequest (com.sequenceiq.cloudbreak.cloud.event.CloudPlatformRequest)1 Before (org.aspectj.lang.annotation.Before)1 Event (reactor.bus.Event)1