com.raynigon.ecs.logging.access.processor.DurationProcessor Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ecs-logging-access Show documentation
Show all versions of ecs-logging-access Show documentation
The ecs-logging-access is a part of the unit-api
The newest version!
package com.raynigon.ecs.logging.access.processor;
import ch.qos.logback.access.common.spi.IAccessEvent;
import com.raynigon.ecs.logging.access.event.EcsAccessEvent;
import com.raynigon.ecs.logging.access.event.EcsAccessLogEvent;
public class DurationProcessor implements AccessEventProcessor {
@Override
public EcsAccessLogEvent process(EcsAccessLogEvent result, IAccessEvent event) {
if (!(event instanceof EcsAccessEvent)) return result;
if (((EcsAccessEvent) event).getDuration().isZero()) return result;
return result.toBuilder()
.duration(((EcsAccessEvent) event).getDuration())
.build();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy