package reuse.pipe.decorator;

import reuse.pipe.Decorator;
import reuse.pipe.Target;

public class LogDecorator<T> extends Decorator<T> {
	static org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger(LogDecorator.class);

	public LogDecorator(Target<T> target) {
		super(target);
	}

	@Override
	public void send(T o) {
		log.debug("{}", o);
		super.send(o);
	}

}

@@ -26,16 +26,44 @@
 tor;%0D%0A%0D%0A
+import org.slf4j.Logger;%0D%0A%0D%0A
 import r
@@ -84,16 +84,16 @@
 rator;%0D%0A
-
 import r
@@ -171,14 +171,15 @@
 %7B%0D%0A%09
-static
+private
  org
@@ -256,16 +256,293 @@
 ss);%0D%0A%0D%0A
+%09private String logMsg = %22%7B%7D%22;%0D%0A%0D%0A%09public LogDecorator(Logger log, String logMsg, Target%3CT%3E target) %7B%0D%0A%09%09super(target);%0D%0A%09%09this.log = log;%0D%0A%09%09this.logMsg = logMsg;%0D%0A%09%7D%0D%0A%0D%0A%09public LogDecorator(String logMsg, Target%3CT%3E target) %7B%0D%0A%09%09super(target);%0D%0A%09%09this.logMsg = logMsg;%0D%0A%09%7D%0D%0A%0D%0A
 %09public 
@@ -649,20 +649,22 @@
 g.debug(
-%22%7B%7D%22
+logMsg
 , o);%0D%0A%09

make logging more flexible