]> git.argeo.org Git - gpl/argeo-slc.git/blob - runtime/org.argeo.slc.support.simple/src/main/java/org/argeo/slc/core/execution/tasks/Echo.java
Improve OSGi console extension
[gpl/argeo-slc.git] / runtime / org.argeo.slc.support.simple / src / main / java / org / argeo / slc / core / execution / tasks / Echo.java
1 package org.argeo.slc.core.execution.tasks;
2
3 import org.apache.commons.logging.Log;
4 import org.apache.commons.logging.LogFactory;
5 import org.argeo.slc.execution.Executable;
6
7 public class Echo implements Executable {
8 private final static Log defaultLog = LogFactory.getLog(Echo.class);
9
10 private Log log;
11 private String message;
12
13 public void execute() {
14 log().info(message);
15 }
16
17 protected Log log() {
18 return log != null ? log : defaultLog;
19 }
20
21 public void setLog(Log log) {
22 this.log = log;
23 }
24
25 public void setMessage(String message) {
26 this.message = message;
27 }
28
29 }