From f4f29dbec170e6f9de9f56912d241cc41f171ed3 Mon Sep 17 00:00:00 2001 From: Serhii Hrabas Date: Thu, 12 Jan 2017 20:09:51 +0200 Subject: [PATCH] Log message will be raw (no traceId or any other metadata which comming with logentries lib), if AndroidLogger.getInstance().setSendRawLogMessage(false) was set. --- .../java/com/logentries/logger/AsyncLoggingWorker.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/src/main/java/com/logentries/logger/AsyncLoggingWorker.java b/lib/src/main/java/com/logentries/logger/AsyncLoggingWorker.java index b01e101..285c055 100644 --- a/lib/src/main/java/com/logentries/logger/AsyncLoggingWorker.java +++ b/lib/src/main/java/com/logentries/logger/AsyncLoggingWorker.java @@ -342,8 +342,11 @@ public void run() { } if (message != null) { - this.leClient.write(Utils.formatMessage(message.replace("\n", LINE_SEP_REPLACER), - logHostName, useHttpPost)); + if(sendRawLogMessage){ + this.leClient.write(Utils.formatMessage(message.replace("\n", LINE_SEP_REPLACER),logHostName, useHttpPost)); + }else{ + this.leClient.write(message.replace("\n", LINE_SEP_REPLACER)); + } message = null; }