[ML] Put C++ process/PID and file@line in square brackets (elastic/x-pack-elasticsearch#671)

This is the Elastic convention, and also makes it clearer where the
actual log message from the C++ starts

Original commit: elastic/x-pack-elasticsearch@dc9aeefb08
This commit is contained in:
David Roberts 2017-03-01 09:33:30 +00:00 committed by GitHub
parent ac93195407
commit 094be3c28b
1 changed files with 3 additions and 2 deletions

View File

@ -215,9 +215,10 @@ public class CppLogMessageHandler implements Closeable {
}
// TODO: Is there a way to preserve the original timestamp when re-logging?
if (jobId != null) {
LOGGER.log(level, "[{}] {}/{} {}@{} {}", jobId, msg.getLogger(), latestPid, msg.getFile(), msg.getLine(), latestMessage);
LOGGER.log(level, "[{}] [{}/{}] [{}@{}] {}", jobId, msg.getLogger(), latestPid, msg.getFile(), msg.getLine(),
latestMessage);
} else {
LOGGER.log(level, "{}/{} {}@{} {}", msg.getLogger(), latestPid, msg.getFile(), msg.getLine(), latestMessage);
LOGGER.log(level, "[{}/{}] [{}@{}] {}", msg.getLogger(), latestPid, msg.getFile(), msg.getLine(), latestMessage);
}
// TODO: Could send the message for indexing instead of or as well as logging it
} catch (IOException e) {