/*\r
- * Copyright (C) 2010 Mathieu Baudier <mbaudier@argeo.org>\r
+ * Copyright (C) 2007-2012 Argeo GmbH\r
*\r
* Licensed under the Apache License, Version 2.0 (the "License");\r
* you may not use this file except in compliance with the License.\r
* See the License for the specific language governing permissions and\r
* limitations under the License.\r
*/\r
-\r
package org.argeo.slc.execution;\r
\r
import java.io.Serializable;\r
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
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
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