IVGCVSW-1075 Fix Android build ARM_COMPUTE_LOG_STREAM macro

Change-Id: Idc0809ff84c4d33c022f9b5d420d05fb7f65abc7
Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/122570
Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com>
Reviewed-by: Anthony Barbier <anthony.barbier@arm.com>
Tested-by: Jenkins <bsgcomp@arm.com>
diff --git a/arm_compute/core/utils/logging/Macros.h b/arm_compute/core/utils/logging/Macros.h
index bc121e2..5593030 100644
--- a/arm_compute/core/utils/logging/Macros.h
+++ b/arm_compute/core/utils/logging/Macros.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017 ARM Limited.
+ * Copyright (c) 2017-2018 ARM Limited.
  *
  * SPDX-License-Identifier: MIT
  *
@@ -50,14 +50,16 @@
         }                                                                                \
     } while(false)
 
-#define ARM_COMPUTE_LOG_STREAM(logger_name, log_level, stream)                                                 \
-    do                                                                                                         \
-    {                                                                                                          \
-        auto __logger = arm_compute::logging::LoggerRegistry::get().logger(logger_name);                       \
-        if(__logger != nullptr)                                                                                \
-        {                                                                                                      \
-            __logger->log(log_level, static_cast<std::ostringstream &>(std::ostringstream() << stream).str()); \
-        }                                                                                                      \
+#define ARM_COMPUTE_LOG_STREAM(logger_name, log_level, stream)                           \
+    do                                                                                   \
+    {                                                                                    \
+        auto __logger = arm_compute::logging::LoggerRegistry::get().logger(logger_name); \
+        if(__logger != nullptr)                                                          \
+        {                                                                                \
+            std::ostringstream s;                                                        \
+            s << stream;                                                                 \
+            __logger->log(log_level, s.str());                                           \
+        }                                                                                \
     } while(false)
 
 #else /* ARM_COMPUTE_LOGGING_ENABLED */