tizen 2.4 release
[framework/web/wrt-commons.git] / modules / rpc / src / generic_rpc_connection.cpp
@@ -21,8 +21,7 @@
  */
 #include <stddef.h>
 #include <dpl/rpc/generic_rpc_connection.h>
-#include <dpl/scoped_array.h>
-#include <dpl/log/log.h>
+#include <dpl/log/wrt_log.h>
 #include <dpl/aligned.h>
 #include <stdexcept>
 
@@ -56,22 +55,22 @@ GenericRPCConnection::GenericRPCConnection(
     AbstractWaitableInputOutput *inputOutput) :
     m_inputOutput(inputOutput)
 {
-    LogPedantic("Opening generic RPC...");
+    WrtLogD("Opening generic RPC...");
     WaitableInputOutputExecutionContextSupport::Open(inputOutput);
-    LogPedantic("Generic RPC opened");
+    WrtLogD("Generic RPC opened");
 }
 
 GenericRPCConnection::~GenericRPCConnection()
 {
     // Ensure RPC is closed
-    LogPedantic("Closing generic RPC...");
+    WrtLogD("Closing generic RPC...");
     WaitableInputOutputExecutionContextSupport::Close();
-    LogPedantic("Generic RPC closed");
+    WrtLogD("Generic RPC closed");
 }
 
 void GenericRPCConnection::AsyncCall(const RPCFunction &function)
 {
-    LogPedantic("Executing async call");
+    WrtLogD("Executing async call");
 
     // Create binary call
     BinaryQueue serializedCall = function.Serialize();
@@ -98,7 +97,7 @@ void GenericRPCConnection::AsyncCall(const RPCFunction &function)
 
 void GenericRPCConnection::Ping()
 {
-    LogPedantic("Executing ping call");
+    WrtLogD("Executing ping call");
 
     // Append buffers
     Protocol::AsyncCall call;
@@ -121,7 +120,7 @@ void GenericRPCConnection::Ping()
 
 void GenericRPCConnection::OnInputStreamRead()
 {
-    LogPedantic("Interpreting " << m_inputStream.Size() << " bytes buffer");
+    WrtLogD("Interpreting %i bytes buffer", m_inputStream.Size());
 
     // Enough bytes to read at least one header ?
     if (m_inputStream.Size() >= sizeof(Protocol::Header)) {
@@ -133,7 +132,7 @@ void GenericRPCConnection::OnInputStreamRead()
             if (m_inputStream.Size() >= sizeof(Protocol::Header) +
                 header.size)
             {
-                LogPedantic("Will parse packet of type: " << header.type);
+                WrtLogD("Will parse packet of type: %i", header.type);
 
                 // Allocate new packet (header + real packet data)
                 void *binaryPacket = malloc(
@@ -164,9 +163,7 @@ void GenericRPCConnection::OnInputStreamRead()
                     // ...but just remove protocol header
                     call.Consume(sizeof(Protocol::Header));
 
-                    LogPedantic(
-                        "Async call of size: " << header.size <<
-                        " parsed");
+                    WrtLogD("Async call of size: %i parsed", header.size);
 
                     // Call async call event listeners
                     DPL::Event::EventSupport<AbstractRPCConnectionEvents::
@@ -185,22 +182,22 @@ void GenericRPCConnection::OnInputStreamRead()
                     // Do not need packet data
                     free(binaryPacket);
 
-                    LogPedantic("Ping pong replied");
+                    WrtLogD("Ping pong replied");
                 }
                 break;
 
                 default:
-                    LogPedantic("Warning: Unknown packet type");
+                    WrtLogD("Warning: Unknown packet type");
                     free(binaryPacket);
                     break;
                 }
             } else {
-                LogPedantic("Too few bytes to read packet");
+                WrtLogD("Too few bytes to read packet");
                 break;
             }
         }
     } else {
-        LogPedantic("Too few bytes to read header");
+        WrtLogD("Too few bytes to read header");
     }
 }