]> git.argeo.org Git - gpl/argeo-slc.git/blobdiff - runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/execution/ExecutionStep.java
Save current state even if not completely stable
[gpl/argeo-slc.git] / runtime / org.argeo.slc.specs / src / main / java / org / argeo / slc / execution / ExecutionStep.java
index 4cabeec097d6f5c2406c7d434cca6e238c0893cc..74201c0e2ff4cea0f08a3a16dab76cd3e24df3db 100644 (file)
@@ -34,9 +34,9 @@ public class ExecutionStep implements Serializable {
        public final static String DEBUG = "DEBUG";\r
        public final static String TRACE = "TRACE";\r
 \r
-       /** @deprecated*/\r
+       /** @deprecated */\r
        public final static String START = "START";\r
-       /** @deprecated*/\r
+       /** @deprecated */\r
        public final static String END = "END";\r
 \r
        // TODO make the fields final and private when we don't need POJO support\r
@@ -47,27 +47,28 @@ public class ExecutionStep implements Serializable {
        protected Date timestamp;\r
        protected String log;\r
 \r
+       private String location;\r
+\r
        /** Empty constructor */\r
        public ExecutionStep() {\r
-               thread = Thread.currentThread().getName();\r
-       }\r
-\r
-       /** Creates a step at the current date of type INFO */\r
-       public ExecutionStep(String log) {\r
-               this(new Date(), INFO, log);\r
+               Thread currentThread = Thread.currentThread();\r
+               thread = currentThread.getName();\r
        }\r
 \r
        /** Creates a step at the current date */\r
-       public ExecutionStep(String type, String log) {\r
-               this(new Date(), type, log);\r
+       public ExecutionStep(String location, String type, String log) {\r
+               this(location, new Date(), type, log);\r
        }\r
 \r
        /** Creates a step of the given type. */\r
-       public ExecutionStep(Date timestamp, String type, String log) {\r
-               this(timestamp, type, log, Thread.currentThread().getName());\r
+       public ExecutionStep(String location, Date timestamp, String type,\r
+                       String log) {\r
+               this(location, timestamp, type, log, Thread.currentThread().getName());\r
        }\r
 \r
-       public ExecutionStep(Date timestamp, String type, String log, String thread) {\r
+       public ExecutionStep(String location, Date timestamp, String type,\r
+                       String log, String thread) {\r
+               this.location = location;\r
                this.type = type;\r
                this.timestamp = timestamp;\r
                this.thread = thread;\r
@@ -103,4 +104,9 @@ public class ExecutionStep implements Serializable {
                return "Execution step, thread=" + thread + ", type=" + type;\r
        }\r
 \r
+       /** Typically the logging category */\r
+       public String getLocation() {\r
+               return location;\r
+       }\r
+\r
 }\r