Merge pull request #2823 from wschaeferB/2645-LogReadabilityImprovement

2645 made message type the first element in logs
This commit is contained in:
Richard Cordovano 2017-06-05 14:47:05 -04:00 committed by GitHub
commit 13adfc07ef

View File

@ -438,7 +438,7 @@ final class AutoIngestJobLogger {
if (null != lock) {
File logFile = logPath.toFile();
try (PrintWriter writer = new PrintWriter(new BufferedWriter(new FileWriter(logFile, logFile.exists())), true)) {
writer.println(String.format("%s %s: %s: %s: %-8s: %s", logDateFormat.format((Date.from(Instant.now()).getTime())), hostName, manifestFileName, dataSourceFileName, category.toString(), message));
writer.println(String.format("%-8s: %s %s: %s: %s: %s", category.toString(), logDateFormat.format((Date.from(Instant.now()).getTime())), hostName, manifestFileName, dataSourceFileName, message));
} catch (IOException ex) {
throw new AutoIngestJobLoggerException(String.format("Failed to write case auto ingest log message (\"%s\") for %s", message, manifestPath), ex);
}