Skip to content

Commit

Permalink
runtime logs output in separate folder
Browse files Browse the repository at this point in the history
  • Loading branch information
iliasger committed Oct 27, 2015
1 parent 28e5d70 commit c40a513
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ public class RuntimeLogger {
/**
* The default directory where the log files are placed.
*/
private static final String LOG_DIRECTORY = "logs";
private static final String LOG_DIRECTORY = "logs/runtime";
/**
* Specifies the default file where the logging records of the runtime events are written.
* This file destination can be overridden using the
Expand Down Expand Up @@ -357,13 +357,13 @@ public void log(RuntimeLogRecord record)
// Write the knowledge
Map<String, Object> values = record.getValues();
for (String valueKey : values.keySet()) {
recordBuilder.append("<")
recordBuilder.append("\t<")
.append(valueKey)
.append(">");
writeKnowledge(recordBuilder, values.get(valueKey));
recordBuilder.append("</")
.append(valueKey)
.append(">");
.append(">\n");
}

// Close the record tag
Expand Down
8 changes: 4 additions & 4 deletions jdeeco-core/src/cz/cuni/mff/d3s/deeco/task/EnsembleTask.java
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ private class EnsembleLogRecord extends RuntimeLogRecord
* Construct the {@link EnsembleLogRecord} instance.
*/
public EnsembleLogRecord() {
super("EnsambleTask", new HashMap<String, Object>());
super("EnsembleTask", new HashMap<String, Object>());
}

}
Expand Down Expand Up @@ -443,16 +443,16 @@ private void evaluateMembershipAndPerformExchange(ReadOnlyKnowledgeManager shado

/**
* Log the current ensemble membership status (ensemble exists/doesn't exist) using the {@link RuntimeLogger}.
* @param ensambleName is the name of tested ensemble.
* @param ensembleName is the name of tested ensemble.
* @param coordinatorID is the identifier of the coordinator in the tested ensemble.
* @param memberID is the identifier of the member in the tested ensemble.
* @param membership is the membership validity value (ensemble exists(true)/doesn't exist(false)).
* @throws TaskInvocationException Thrown if there is a problem writing into the log files.
*/
private void logMembershipStatus(String ensambleName, String coordinatorID, String memberID, boolean membership) throws TaskInvocationException
private void logMembershipStatus(String ensembleName, String coordinatorID, String memberID, boolean membership) throws TaskInvocationException
{
EnsembleLogRecord record = new EnsembleLogRecord();
record.getValues().put("ensambleName", ensambleName);
record.getValues().put("ensembleName", ensembleName);
record.getValues().put("coordinatorID", coordinatorID);
record.getValues().put("memberID", memberID);
record.getValues().put("membership", membership);
Expand Down

0 comments on commit c40a513

Please sign in to comment.