" rpc_port_##_h h = data;\n" \
"\n" \
" if (!parcel || !h) {\n" \
- " LOGE(\"Invalid parameter\");\n" \
+ " dlog_print(DLOG_ERROR, LOG_TAG, \"Invalid parameter\");\n" \
" return;\n" \
" }\n" \
"$$" \
" rpc_port_##_h h = data;\n" \
"\n"
" if (!parcel || !h) {\n" \
- " LOGE(\"Invalid parameter\");\n" \
+ " dlog_print(DLOG_ERROR, LOG_TAG,\"Invalid parameter\");\n" \
" return;\n" \
" }\n" \
"$$" \
" struct ##_s *handle;\n" \
"\n" \
" if (!h) {\n" \
- " LOGE(\"Invalid parameter\");\n" \
+ " dlog_print(DLOG_ERROR, LOG_TAG, \"Invalid parameter\");\n" \
" return -1;\n" \
" }\n" \
"\n" \
" handle = calloc(1, sizeof(struct ##_s));\n" \
" if (!handle) {\n" \
- " LOGE(\"Out of memory\");\n" \
+ " dlog_print(DLOG_ERROR, LOG_TAG, \"Out of memory\");\n" \
" return -1;\n" \
" }\n" \
"\n"
"int rpc_port_##_destroy(rpc_port_##_h h)\n" \
"{\n" \
" if (!h) {\n" \
- " LOGE(\"Invalid parameter\");\n" \
+ " dlog_print(DLOG_ERROR, LOG_TAG, \"Invalid parameter\");\n" \
" return -1;\n" \
" }\n" \
"\n" \
"int rpc_port_$$_$$_$$(rpc_port_$$_h h, $$$$)\n" \
"{\n" \
" if ($$) {\n" \
- " LOGE(\"Invalid parameter\");\n" \
+ " dlog_print(DLOG_ERROR, LOG_TAG, \"Invalid parameter\");\n" \
" return -1;\n" \
" }\n" \
"$$" \
"int rpc_port_$$_get_$$(rpc_port_$$_h h, $$$$)\n" \
"{\n" \
" if (!h || $$) {\n" \
- " LOGE(\"Invalid parameter\");\n" \
+ " dlog_print(DLOG_ERROR, LOG_TAG, \"Invalid parameter\");\n" \
" return -1;\n" \
" }\n" \
"$$" \
"void (*callback)($$$$, void *user_data), void *user_data)\n" \
"{\n" \
" if (!h || !callback) {\n" \
- " LOGE(\"Invalid parameter\");\n" \
+ " dlog_print(DLOG_ERROR, LOG_TAG, \"Invalid parameter\");\n" \
" return -1;\n" \
" }\n" \
"$$" \
" rpc_port_##_h handle = NULL;\n" \
"\n" \
" if (!h || !clone) {\n" \
- " LOGE(\"Invalid parameter\");\n" \
+ " dlog_print(DLOG_ERROR, LOG_TAG, \"Invalid parameter\");\n" \
" return -1;\n" \
" }\n" \
"\n" \
" rpc_port_##_create(&handle);\n" \
" if (!handle) {\n" \
- " LOGE(\"Failed to create ## handle\");\n" \
+ " dlog_print(DLOG_ERROR, LOG_TAG, \"Failed to create ## handle\");\n" \
" return -1;\n" \
" }\n" \
"$$" \
"\n" \
" iter = g_list_next(iter);\n" \
" if (!value) {\n" \
- " LOGW(\"Warning: value is NULL\");\n" \
+ " dlog_print(DLOG_WARN, LOG_TAG, \"Warning: value is NULL\");\n" \
" continue;\n" \
" }\n" \
"\n" \
"\n" \
" h->## = calloc(h->##_size, sizeof(*h->##));\n" \
" if (!h->##) {\n" \
- " LOGE(\"Out of memory\");\n" \
+ " dlog_print(DLOG_ERROR, LOG_TAG, \"Out of memory\");\n" \
" return;\n" \
" }\n" \
"\n" \
},
[&]()->std::string {
std::string ss;
- ss += "LOGE(\"Failed to create handle\");" + NLine(1);
+ ss += "dlog_print(DLOG_ERROR, LOG_TAG, \"Failed to create handle\");" + NLine(1);
ss += "return;" + NLine(1);
return ss;
}
},
[&]()->std::string {
std::string ss;
- ss += "LOGE(\"Out of memory\");" + NLine(1);
+ ss += "dlog_print(DLOG_ERROR, LOG_TAG, \"Out of memory\");" + NLine(1);
ss += "return;" + NLine(1);
return ss;
}
},
[&]()->std::string {
std::string ss;
- ss += "LOGE(\"Failed to create handle\");" + NLine(1);
+ ss += "dlog_print(DLOG_ERROR, LOG_TAG, \"Failed to create handle\");" + NLine(1);
ss += "return;" + NLine(1);
return ss;
}
"do {\n" \
" h->## = calloc(##_size, sizeof(*##));\n" \
" if (!h->##) {\n" \
- " LOGE(\"Out of memory\");\n" \
+ " dlog_print(DLOG_ERROR, LOG_TAG, \"Out of memory\");\n" \
" return -1;\n" \
" }\n" \
" h->##_size = ##_size;\n" \
},
[&]()->std::string {
std::string s;
- s += "LOGE(\"Failed to duplicate data\");" + NLine(1);
+ s += "dlog_print(DLOG_ERROR, LOG_TAG, \"Failed to duplicate data\");" + NLine(1);
s += "return -1;" + NLine(1);
return s;
}
},
[&]()->std::string {
std::string s;
- s += "LOGE(\"Out of memory\");" + NLine(1);
+ s += "dlog_print(DLOG_ERROR, LOG_TAG, \"Out of memory\");" + NLine(1);
s += "return -1;" + NLine(1);
return s;
}
const char do_while_array[] =
"do {\n" \
" if (h->##_size == 0) {\n" \
- " LOGW(\"## is empty\");\n" \
+ " dlog_print(DLOG_WARN, LOG_TAG, \"## is empty\");\n" \
" break;\n" \
" }\n" \
"\n" \
" *## = calloc(h->##_size, sizeof(*h->##));\n" \
" if (!*##) {\n" \
- " LOGE(\"Out of memory\");\n" \
+ " dlog_print(DLOG_ERROR, LOG_TAG, \"Out of memory\");\n" \
" return -1;\n" \
" }\n" \
" *##_size = h->##_size;\n" \
},
[&]()->std::string {
std::string s;
- s += "LOGE(\"Invalid parameter: h->" + id +
+ s += "dlog_print(DLOG_ERROR, LOG_TAG, \"Invalid parameter: h->" + id +
" is NULL\");" + NLine(1);
s += "return -1;" + NLine(1);
return s;
},
[&]()->std::string {
std::string s;
- s += "LOGE(\"Failed to duplicate " + id + "\");" + NLine(1);
+ s += "dlog_print(DLOG_ERROR, LOG_TAG, \"Failed to duplicate " + id + "\");" + NLine(1);
s += "return -1;" + NLine(1);
return s;
}
"\n" \
" iter = g_list_next(iter);\n" \
" if (!value) {\n" \
- " LOGW(\"Warning: value is NULL\");\n" \
+ " dlog_print(DLOG_WARN, LOG_TAG, \"Warning: value is NULL\");\n" \
" continue;\n" \
" }\n" \
"\n" \
" $$value = iter->data;\n" \
"\n" \
" if (!value) {\n" \
- " LOGE(\"Error: value is NULL\");\n" \
+ " dlog_print(DLOG_ERROR, LOG_TAG, \"Error: value is NULL\");\n" \
" rpc_port_$$_destroy(handle);\n"
" return -1;\n" \
" }\n" \
const char do_while_array[] =
"do {\n" \
" if (h->##_size == 0) {\n" \
- " LOGW(\"## is empty\");\n" \
+ " dlog_print(DLOG_WARN, LOG_TAG, \"## is empty\");\n" \
" break;\n" \
" }\n" \
"\n" \
" handle->## = calloc(h->##_size, sizeof(*h->##));\n" \
" if (!handle->##) {\n" \
- " LOGE(\"Out of memory\");\n" \
+ " dlog_print(DLOG_ERROR, LOG_TAG, \"Out of memory\");\n" \
" return -1;\n" \
" }\n" \
" handle->##_size = h->##_size;\n" \
},
[&]()->std::string {
std::string ss;
- ss += "LOGE(\"Failed to duplicate h->" + id + "\");" +
+ ss += "dlog_print(DLOG_ERROR, LOG_TAG, \"Failed to duplicate h->" + id + "\");" +
NLine(1);
ss += "rpc_port_" + st.GetID() + "_destroy(handle);" +
NLine(1);
},
[&]()->std::string {
std::string ss;
- ss += "LOGE(\"Failed to duplicate value\");" +
+ ss += "dlog_print(DLOG_ERROR, LOG_TAG, \"Failed to duplicate value\");" +
NLine(1);
ss += "rpc_port_" + st.GetID() + "_destroy(handle);" +
NLine(1);
},
[&]()->std::string {
std::string tmp;
- tmp += "LOGE(\"Out of memory\");" + NLine(1);
+ tmp += "dlog_print(DLOG_ERROR, LOG_TAG, \"Out of memory\");" + NLine(1);
tmp += "rpc_port_" + st.GetID() + "_destroy(handle);" +
NLine(1);
tmp += "return -1;" + NLine(1);
" struct ##_s *handle = data;\n" \
"\n" \
" if (!handle) {\n" \
- " LOGE(\"Invalid parameter\");\n" \
+ " dlog_print(DLOG_ERROR, LOG_TAG, \"Invalid parameter\");\n" \
" return;\n" \
" }\n" \
"\n" \
" struct ##_s *handle = data;\n" \
"\n" \
" if (!handle) {\n" \
- " LOGE(\"Invalid parameter\");\n" \
+ " dlog_print(DLOG_ERROR, LOG_TAG, \"Invalid parameter\");\n" \
" return;\n" \
" }\n" \
"\n" \
"\n" \
" handle = calloc(1, sizeof(struct ##_s));\n" \
" if (!handle) {\n" \
- " LOGE(\"Out of memory\");\n" \
+ " dlog_print(DLOG_ERROR, LOG_TAG, \"Out of memory\");\n" \
" return NULL;\n" \
" }\n" \
"\n" \
" if (__##_delegate_table[id])\n" \
" __##_delegate_table[id](list, parcel, seq_id);\n" \
"} else {\n" \
- " LOGW(\"Unknown id(%d)\", id);\n" \
+ " dlog_print(DLOG_WARN, LOG_TAG, \"Unknown id(%d)\", id);\n" \
"}\n";
std::string str;
int cnt = 0;
" handle->port = port;\n" \
" if (handle->callback.connected)\n" \
" handle->callback.connected(handle, handle->user_data);\n" \
- " LOGI(\"[__RPC_PORT__] endpoint(%s), port_name(%s)\", endpoint, port_name);\n" \
+ " dlog_print(DLOG_INFO, LOG_TAG, \"[__RPC_PORT__] endpoint(%s), port_name(%s)\", endpoint, port_name);\n" \
"}\n";
stream << NLine(1);
stream << SmartIndent(ReplaceAll(block, "##", inf.GetID()));
" handle->port = NULL;\n" \
" if (handle->callback.disconnected)\n" \
" handle->callback.disconnected(handle, handle->user_data);\n" \
- " LOGI(\"[__RPC_PORT__] endpoint(%s), port_name(%s)\", endpoint, port_name);\n" \
+ " dlog_print(DLOG_INFO, LOG_TAG, \"[__RPC_PORT__] endpoint(%s), port_name(%s)\", endpoint, port_name);\n" \
"}\n";
stream << NLine(1);
stream << SmartIndent(ReplaceAll(block, "##", inf.GetID()));
" handle->port = NULL;\n" \
" if (handle->callback.rejected)\n" \
" handle->callback.rejected(handle, handle->user_data);\n" \
- " LOGI(\"[__RPC_PORT__] endpoint(%s), port_name(%s)\", endpoint, port_name);\n" \
+ " dlog_print(DLOG_INFO, LOG_TAG, \"[__RPC_PORT__] endpoint(%s), port_name(%s)\", endpoint, port_name);\n" \
"}\n";
stream << NLine(1);
stream << SmartIndent(ReplaceAll(block, "##", inf.GetID()));
" rpc_port_parcel_create_from_port(&parcel_received, handle->port);\n" \
" rpc_port_parcel_read_int32(parcel_received, &cmd);\n" \
" if (cmd != ##_METHOD_Callback) {\n" \
- " LOGE(\"Invalid protocol\");\n" \
+ " dlog_print(DLOG_ERROR, LOG_TAG, \"Invalid protocol\");\n" \
" rpc_port_parcel_destroy(parcel_received);\n" \
" return;\n" \
" }\n" \
"\n" \
" __##_process_received_event(handle->delegates, parcel_received);\n" \
" rpc_port_parcel_destroy(parcel_received);\n" \
- " LOGI(\"[__RPC_PORT__] endpoint(%s), port_name(%s)\", endpoint, port_name);\n" \
+ " dlog_print(DLOG_INFO, LOG_TAG, \"[__RPC_PORT__] endpoint(%s), port_name(%s)\", endpoint, port_name);\n" \
"}\n";
stream << NLine(1);
stream << SmartIndent(ReplaceAll(block, "##", inf.GetID()));
"$$" \
"\n" \
" if (!h$$) {\n" \
- " LOGE(\"Invalid parameter\");\n" \
+ " dlog_print(DLOG_ERROR, LOG_TAG, \"Invalid parameter\");\n" \
" return$$;\n" \
" }\n" \
"\n" \
" if (!h->port) {\n" \
- " LOGE(\"Not connected\");\n" \
+ " dlog_print(DLOG_ERROR, LOG_TAG, \"Not connected\");\n" \
" return$$;\n" \
" }\n" \
"\n" \
"\n" \
" handle = calloc(1, sizeof(struct ##_s));\n" \
" if (!handle) {\n " \
- " LOGE(\"Out of memory\");\n" \
+ " dlog_print(DLOG_ERROR, LOG_TAG, \"Out of memory\");\n" \
" return NULL;\n" \
" }\n" \
"\n" \
" handle->stub_appid = strdup(stub_appid);\n" \
" if (!handle->stub_appid) {\n" \
- " LOGE(\"Out of memory\");\n" \
+ " dlog_print(DLOG_ERROR, LOG_TAG, \"Out of memory\");\n" \
" free(handle);\n" \
" return NULL;\n" \
" }\n" \
"\n" \
" rpc_port_proxy_create(&handle->proxy);\n" \
" if (!handle->proxy) {\n" \
- " LOGE(\"Failed to create proxy\");\n" \
+ " dlog_print(DLOG_ERROR, LOG_TAG, \"Failed to create proxy\");\n" \
" free(handle->stub_appid);\n" \
" free(handle);\n" \
" return NULL;\n" \
" int r;\n" \
"\n" \
" if (!stub_appid || !callback || !h) {\n" \
- " LOGE(\"Invalid parameter\");\n" \
+ " dlog_print(DLOG_ERROR, LOG_TAG, \"Invalid parameter\");\n" \
" return -1;\n" \
" }\n" \
"\n" \
"\n" \
" r = rpc_port_proxy_add_connected_event_cb(handle->proxy, __##_on_connected, handle);\n" \
" if (r != 0) {\n" \
- " LOGE(\"Failed to add connected event cb. err = %d\", r);\n" \
+ " dlog_print(DLOG_ERROR, LOG_TAG, \"Failed to add connected event cb. err = %d\", r);\n" \
" __destroy_##(handle);\n" \
" return r;\n" \
" }\n" \
"\n" \
" r = rpc_port_proxy_add_disconnected_event_cb(handle->proxy, __##_on_disconnected, handle);\n" \
" if (r != 0) {\n" \
- " LOGE(\"Failed to add disconnected event cb. err = %d\", r);\n" \
+ " dlog_print(DLOG_ERROR, LOG_TAG, \"Failed to add disconnected event cb. err = %d\", r);\n" \
" __destroy_##(handle);\n" \
" return r;\n" \
" }\n" \
"\n" \
" r = rpc_port_proxy_add_rejected_event_cb(handle->proxy, __##_on_rejected, handle);\n" \
" if (r != 0) {\n" \
- " LOGE(\"Failed to add rejected event cb. err = %d\", r);\n" \
+ " dlog_print(DLOG_ERROR, LOG_TAG, \"Failed to add rejected event cb. err = %d\", r);\n" \
" __destroy_##(handle);\n" \
" return r;\n" \
" }\n" \
"\n" \
" r = rpc_port_proxy_add_received_event_cb(handle->proxy, __##_on_received, handle);\n" \
" if (r != 0) {\n" \
- " LOGE(\"Failed to add received event cb. err = %d\", r);\n" \
+ " dlog_print(DLOG_ERROR, LOG_TAG, \"Failed to add received event cb. err = %d\", r);\n" \
" __destroy_##(handle);\n" \
" return r;\n" \
" }\n" \
"\n" \
" r = rpc_port_proxy_connect(handle->proxy, stub_appid, \"##\");\n" \
" if (r != 0) {\n" \
- " LOGE(\"Failed to connect ##(%s)\", stub_appid);\n" \
+ " dlog_print(DLOG_ERROR, LOG_TAG, \"Failed to connect ##(%s)\", stub_appid);\n" \
" __destroy_##(handle);\n" \
" return r;\n" \
" }\n" \
"int rpc_port_proxy_##_disconnect(rpc_port_proxy_##_h h)\n" \
"{\n" \
" if (!h) {\n" \
- " LOGE(\"Invalid parameter\");\n" \
+ " dlog_print(DLOG_ERROR, LOG_TAG, \"Invalid parameter\");\n" \
" return -1;\n" \
" }\n" \
"\n" \
"\n" \
" parcel_received = __$$_consume_command(h);\n" \
" if (!parcel_received) {\n" \
- " LOGE(\"Invalid protocol\");\n" \
+ " dlog_print(DLOG_ERROR, LOG_TAG, \"Invalid protocol\");\n" \
" break;\n" \
" }\n" \
"\n" \
"{\n" \
" rpc_port_stub_##_context_h context;\n" \
"\n" \
- " LOGI(\"[__RPC_PORT__] sender(%s), instance(%s)\", sender, instance);\n" \
+ " dlog_print(DLOG_INFO, LOG_TAG, \"[__RPC_PORT__] sender(%s), instance(%s)\", sender, instance);\n" \
" context = __create_##_context(sender, instance);\n" \
" if (!context)\n" \
" return;\n" \
"{\n" \
" rpc_port_stub_##_context_h context;\n" \
"\n" \
- " LOGI(\"[__RPC_PORT__] sender(%s), instance(%s)\", sender, instance);\n" \
+ " dlog_print(DLOG_INFO, LOG_TAG, \"[__RPC_PORT__] sender(%s), instance(%s)\", sender, instance);\n" \
" context = __find_##_context(instance);\n" \
" if (!context)\n" \
" return;\n" \
" int cmd = -1;\n" \
" int r;\n" \
"\n" \
- " LOGI(\"[__RPC_PORT__] sender(%s), instance(%s)\", sender, instance);\n" \
+ " dlog_print(DLOG_INFO, LOG_TAG, \"[__RPC_PORT__] sender(%s), instance(%s)\", sender, instance);\n" \
" context = __find_##_context(instance);\n" \
" if (!context) {\n" \
- " LOGE(\"Failed to find ## context(%s)\", instance);\n" \
+ " dlog_print(DLOG_ERROR, LOG_TAG, \"Failed to find ## context(%s)\", instance);\n" \
" return -1;\n" \
" }\n" \
" context->port = port;\n" \
"\n" \
" r = rpc_port_parcel_create_from_port(&parcel, port);\n" \
" if (r != 0) {\n" \
- " LOGE(\"Failed to create parcel from port\");\n" \
+ " dlog_print(DLOG_ERROR, LOG_TAG, \"Failed to create parcel from port\");\n" \
" return r;\n" \
" }\n" \
"\n" \
" if (__##_method_table[cmd])\n"
" r = __##_method_table[cmd](port, parcel, context);\n" \
" } else {\n" \
- " LOGE(\"Unknown Command(%d)\", cmd);\n" \
+ " dlog_print(DLOG_ERROR, LOG_TAG, \"Unknown Command(%d)\", cmd);\n" \
" r = -1;\n" \
" }\n"
"\n" \
" int r;\n" \
"\n" \
" if (__##_stub) {\n" \
- " LOGW(\"Already exists\");\n" \
+ " dlog_print(DLOG_WARN, LOG_TAG, \"Already exists\");\n" \
" return -1;\n" \
" }\n" \
"\n" \
" if (!callback) {\n" \
- " LOGE(\"Invalid parameter\");\n" \
+ " dlog_print(DLOG_ERROR, LOG_TAG, \"Invalid parameter\");\n" \
" return -1;\n" \
" }\n" \
"\n" \
" __##_user_data = user_data;\n" \
" r = rpc_port_stub_create(&__##_stub, \"##\");\n" \
" if (r != 0) {\n" \
- " LOGE(\"Failed to create stub handle\");\n" \
+ " dlog_print(DLOG_ERROR, LOG_TAG, \"Failed to create stub handle\");\n" \
" return r;\n" \
" }\n" \
"\n" \
" r = rpc_port_stub_add_received_event_cb(__##_stub, __##_on_received, NULL);\n" \
" if (r != 0) {\n" \
- " LOGE(\"Failed to add received event callback\");\n" \
+ " dlog_print(DLOG_ERROR, LOG_TAG, \"Failed to add received event callback\");\n" \
" rpc_port_stub_destroy(__##_stub);\n" \
" __##_stub = NULL;\n" \
" return r;\n" \
"\n" \
" r = rpc_port_stub_add_connected_event_cb(__##_stub, __##_on_connected, NULL);\n" \
" if (r != 0) {\n" \
- " LOGE(\"Failed to add connected event callback\");\n" \
+ " dlog_print(DLOG_ERROR, LOG_TAG, \"Failed to add connected event callback\");\n" \
" rpc_port_stub_destroy(__##_stub);\n" \
" __##_stub = NULL;\n" \
" return r;\n" \
"\n" \
" r = rpc_port_stub_add_disconnected_event_cb(__##_stub, __##_on_disconnected, NULL);\n" \
" if (r != 0) {\n" \
- " LOGE(\"Failed to add disconnected event callback\");\n" \
+ " dlog_print(DLOG_ERROR, LOG_TAG, \"Failed to add disconnected event callback\");\n" \
" rpc_port_stub_destroy(__##_stub);\n" \
" __##_stub = NULL;\n" \
" return r;\n" \
"\n" \
" r = __##_add_privileges();\n" \
" if (r != 0) {\n" \
- " LOGE(\"Failed to add privileges\");\n" \
+ " dlog_print(DLOG_ERROR, LOG_TAG, \"Failed to add privileges\");\n" \
" rpc_port_stub_destroy(__##_stub);\n" \
" __##_stub = NULL;\n" \
" return r;\n" \
"\n" \
" r = rpc_port_stub_listen(__##_stub);\n" \
" if (r != 0) {\n" \
- " LOGE(\"Failed to listen stub\");\n" \
+ " dlog_print(DLOG_ERROR, LOG_TAG, \"Failed to listen stub\");\n" \
" rpc_port_stub_destroy(__##_stub);\n" \
" __##_stub = NULL;\n" \
" return r;\n" \
const char format[] =
"r = $$;\n" \
"if (r != 0) {\n" \
- " LOGE(\"Failed to add privilege($$)\");\n" \
+ " dlog_print(DLOG_ERROR, LOG_TAG, \"Failed to add privilege($$)\");\n" \
" return r;\n" \
"}\n";
std::string str;
" static int seq_num;\n" \
"\n" \
" if (!h) {\n" \
- " LOGE(\"Invalid parameter\");\n" \
+ " dlog_print(DLOG_ERROR, LOG_TAG, \"Invalid parameter\");\n" \
" return -1;\n" \
" }\n" \
"\n" \
" handle = calloc(1, sizeof(struct ##_s));\n" \
" if (!handle) {\n" \
- " LOGE(\"Out of memory\");\n" \
+ " dlog_print(DLOG_ERROR, LOG_TAG, \"Out of memory\");\n" \
" return -1;\n" \
" }\n" \
"\n" \
"int rpc_port_##_destroy(rpc_port_##_h h)\n" \
"{\n" \
" if (!h) {\n" \
- " LOGE(\"Invalid parameter\");\n" \
+ " dlog_print(DLOG_ERROR, LOG_TAG, \"Invalid parameter\");\n" \
" return -1;\n" \
" }\n" \
"\n" \
" rpc_port_##_h handle = data;\n" \
"\n" \
" if (!handle) {\n" \
- " LOGE(\"Invalid parameter\");\n" \
+ " dlog_print(DLOG_ERROR, LOG_TAG, \"Invalid parameter\");\n" \
" return;\n" \
" }\n" \
"\n" \
" rpc_port_##_h handle = data;\n" \
"\n" \
" if (!handle) {\n" \
- " LOGE(\"Invalid parameter\");\n" \
+ " dlog_print(DLOG_ERROR, LOG_TAG, \"Invalid parameter\");\n" \
" return;\n" \
" }\n" \
"\n" \
" rpc_port_##_h handle;\n" \
"\n" \
" if (!h || !clone) {\n" \
- " LOGE(\"Invalid parameter\");\n" \
+ " dlog_print(DLOG_ERROR, LOG_TAG, \"Invalid parameter\");\n" \
" return -1;\n" \
" }\n" \
"\n" \
" handle = calloc(1, sizeof(struct ##_s));\n" \
" if (!handle) {\n" \
- " LOGE(\"Out of memory\");\n" \
+ " dlog_print(DLOG_ERROR, LOG_TAG, \"Out of memory\");\n" \
" return -1;\n" \
" }\n" \
"\n" \
" rpc_port_parcel_h parcel = NULL;\n" \
"\n" \
" if (!h || !h->port) {\n" \
- " LOGE(\"Invalid parameter\");\n" \
+ " dlog_print(DLOG_ERROR, LOG_TAG, \"Invalid parameter\");\n" \
" return -1;\n" \
" }\n" \
"\n" \
" if (!__$$_context_port_exist(h->port)) {\n" \
- " LOGE(\"Port doesn't exist\");\n" \
+ " dlog_print(DLOG_ERROR, LOG_TAG, \"Port doesn't exist\");\n" \
" return -1;\n" \
" }\n" \
"\n" \
" rpc_port_parcel_create(&parcel);\n" \
" if (!parcel) {\n" \
- " LOGE(\"Failed to create parcel\");\n" \
+ " dlog_print(DLOG_ERROR, LOG_TAG, \"Failed to create parcel\");\n" \
" return -1;\n" \
" }\n" \
"\n" \
"int rpc_port_##_set_port(rpc_port_##_h h, rpc_port_h port)\n" \
"{\n" \
" if (!h || !port) {\n" \
- " LOGE(\"Invalid parameter\");\n" \
+ " dlog_print(DLOG_ERROR, LOG_TAG, \"Invalid parameter\");\n" \
" return -1;\n" \
" }\n" \
"\n" \
"\n"
" handle = calloc(1, sizeof(struct ##_context_s));\n" \
" if (!handle) {\n" \
- " LOGE(\"Out of memory\");\n" \
+ " dlog_print(DLOG_ERROR, LOG_TAG, \"Out of memory\");\n" \
" return NULL;\n" \
" }\n" \
"\n" \
" handle->sender = strdup(sender);\n" \
" if (!handle->sender) {\n" \
- " LOGE(\"Out of memory\");\n" \
+ " dlog_print(DLOG_ERROR, LOG_TAG, \"Out of memory\");\n" \
" free(handle);\n" \
" return NULL;\n" \
" }\n" \
"\n" \
" handle->instance = strdup(instance);\n" \
" if (!handle->instance) {\n" \
- " LOGE(\"Out of memory\");\n" \
+ " dlog_print(DLOG_ERROR, LOG_TAG, \"Out of memory\");\n" \
" free(handle->sender);\n" \
" free(handle);\n" \
" return NULL;\n" \
" struct ##_context_s *handle = data;\n" \
"\n" \
" if (!handle) {\n" \
- " LOGE(\"Critical error!\");\n" \
+ " dlog_print(DLOG_ERROR, LOG_TAG, \"Critical error!\");\n" \
" return;\n" \
" }\n" \
"\n" \
"int rpc_port_stub_##_context_set_tag(rpc_port_stub_##_context_h ctx, void *tag)\n" \
"{\n" \
" if (!ctx) {\n" \
- " LOGE(\"Invalid parameter\");\n" \
+ " dlog_print(DLOG_ERROR, LOG_TAG, \"Invalid parameter\");\n" \
" return -1;\n" \
" }\n" \
"\n" \
"int rpc_port_stub_##_context_get_tag(rpc_port_stub_##_context_h ctx, void **tag)\n" \
"{\n" \
" if (!ctx || !tag) {\n" \
- " LOGE(\"Invalid parameter\");\n" \
+ " dlog_print(DLOG_ERROR, LOG_TAG, \"Invalid parameter\");\n" \
" return -1;\n" \
" }\n" \
"\n" \
"int rpc_port_stub_##_context_get_sender(rpc_port_stub_##_context_h ctx, char **sender)\n" \
"{\n" \
" if (!ctx || !sender) {\n" \
- " LOGE(\"Invalid parameter\");\n" \
+ " dlog_print(DLOG_ERROR, LOG_TAG, \"Invalid parameter\");\n" \
" return -1;\n" \
" }\n" \
"\n" \
" *sender = strdup(ctx->sender);\n" \
" if (*sender == NULL) {\n" \
- " LOGE(\"Out of memory\");\n" \
+ " dlog_print(DLOG_ERROR, LOG_TAG, \"Out of memory\");\n" \
" return -1;\n" \
" }\n" \
"\n" \