X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;f=runtime%2Forg.argeo.slc.specs%2Fsrc%2Fmain%2Fjava%2Forg%2Fargeo%2Fslc%2Fexecution%2FExecutionStep.java;fp=runtime%2Forg.argeo.slc.specs%2Fsrc%2Fmain%2Fjava%2Forg%2Fargeo%2Fslc%2Fexecution%2FExecutionStep.java;h=74201c0e2ff4cea0f08a3a16dab76cd3e24df3db;hb=9b2422e7198df6f34282a805058dd5f497417318;hp=4cabeec097d6f5c2406c7d434cca6e238c0893cc;hpb=94f8c90b4eb50398388b6ee2ebb4e19c8abdee01;p=gpl%2Fargeo-slc.git diff --git a/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/execution/ExecutionStep.java b/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/execution/ExecutionStep.java index 4cabeec09..74201c0e2 100644 --- a/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/execution/ExecutionStep.java +++ b/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/execution/ExecutionStep.java @@ -34,9 +34,9 @@ public class ExecutionStep implements Serializable { public final static String DEBUG = "DEBUG"; public final static String TRACE = "TRACE"; - /** @deprecated*/ + /** @deprecated */ public final static String START = "START"; - /** @deprecated*/ + /** @deprecated */ public final static String END = "END"; // TODO make the fields final and private when we don't need POJO support @@ -47,27 +47,28 @@ public class ExecutionStep implements Serializable { protected Date timestamp; protected String log; + private String location; + /** Empty constructor */ public ExecutionStep() { - thread = Thread.currentThread().getName(); - } - - /** Creates a step at the current date of type INFO */ - public ExecutionStep(String log) { - this(new Date(), INFO, log); + Thread currentThread = Thread.currentThread(); + thread = currentThread.getName(); } /** Creates a step at the current date */ - public ExecutionStep(String type, String log) { - this(new Date(), type, log); + public ExecutionStep(String location, String type, String log) { + this(location, new Date(), type, log); } /** Creates a step of the given type. */ - public ExecutionStep(Date timestamp, String type, String log) { - this(timestamp, type, log, Thread.currentThread().getName()); + public ExecutionStep(String location, Date timestamp, String type, + String log) { + this(location, timestamp, type, log, Thread.currentThread().getName()); } - public ExecutionStep(Date timestamp, String type, String log, String thread) { + public ExecutionStep(String location, Date timestamp, String type, + String log, String thread) { + this.location = location; this.type = type; this.timestamp = timestamp; this.thread = thread; @@ -103,4 +104,9 @@ public class ExecutionStep implements Serializable { return "Execution step, thread=" + thread + ", type=" + type; } + /** Typically the logging category */ + public String getLocation() { + return location; + } + }