
org.dihedron.patterns.experimental.pipeline.impl.Log Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of dihedron-commons Show documentation
Show all versions of dihedron-commons Show documentation
Base set of functionalities, including simple utility classes and more complex patterns.
The newest version!
/**
* Copyright (c) 2012-2014, Andrea Funto'. All rights reserved. See LICENSE for details.
*/
package org.dihedron.patterns.experimental.pipeline.impl;
import org.dihedron.core.License;
import org.dihedron.patterns.experimental.pipeline.Filter;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* @author Andrea Funto'
*/
@License
public class Log implements Filter {
/**
* The logger.
*/
private final static Logger logger = LoggerFactory.getLogger(Log.class);
/**
* @see org.dihedron.patterns.experimental.pipeline.Consumer#consume(java.lang.Object)
*/
@Override
public T consume(T data) {
if(data != null) {
logger.trace("data: '{}'", data);
}
return data;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy