linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* How about adding Dbus log in gdbus?
@ 2011-12-09 15:39 Chanyeol Park
  2011-12-09 21:08 ` Luiz Augusto von Dentz
  0 siblings, 1 reply; 3+ messages in thread
From: Chanyeol Park @ 2011-12-09 15:39 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: 서호철, 편도현

Hello

How about adding dbus log in gdbus when we get method call from the 
remote peer(application)?

Personally It could be very useful for begginer.Based on it many people 
could understand
call procedure easily. As far as I know this was removed when bluez 
3.xx. but compared to the days,
recently many dbus APIs have been introduced.

But I know it is relatetd to many projects(bluez,obexd,connman,ofono).
So we need to consider a few things such as dependency managing and user 
preference.
because curren gdbus does not have dependency with log.c/log.h.

Is there good idea about this?


BR
Chanyeol Park.

diff --git a/gdbus/object.c b/gdbus/object.c
index 8bc12f5..ac7f448 100644
--- a/gdbus/object.c
+++ b/gdbus/object.c
@@ -33,9 +33,7 @@

  #include "gdbus.h"

-#define info(fmt...)
-#define error(fmt...)
-#define debug(fmt...)
+#include "log.h"

  struct generic_data {
         unsigned int refcount;
@@ -444,6 +442,9 @@ static DBusHandlerResult 
generic_message(DBusConnection *connection,
                                                 iface->user_data) == TRUE)
                         return DBUS_HANDLER_RESULT_HANDLED;

+               DBG("%s: %s.%s()",dbus_message_get_path(message),
+                                               iface->name,method->name);
+
                 return process_message(connection, message, method,
                                                         iface->user_data);
         }


Thanks
Chanyeol Park

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: How about adding Dbus log in gdbus?
  2011-12-09 15:39 How about adding Dbus log in gdbus? Chanyeol Park
@ 2011-12-09 21:08 ` Luiz Augusto von Dentz
  2011-12-12 12:57   ` Chanyeol Park
  0 siblings, 1 reply; 3+ messages in thread
From: Luiz Augusto von Dentz @ 2011-12-09 21:08 UTC (permalink / raw)
  To: Chanyeol Park
  Cc: linux-bluetooth, 서호철,
	편도현

Hi Chanyeol,

2011/12/9 Chanyeol Park <chanyeol.park@samsung.com>:
> Hello
>
> How about adding dbus log in gdbus when we get method call from the remote
> peer(application)?
>
> Personally It could be very useful for begginer.Based on it many people
> could understand
> call procedure easily. As far as I know this was removed when bluez 3.xx.
> but compared to the days,
> recently many dbus APIs have been introduced.
>
> But I know it is relatetd to many projects(bluez,obexd,connman,ofono).
> So we need to consider a few things such as dependency managing and user
> preference.
> because curren gdbus does not have dependency with log.c/log.h.
>
> Is there good idea about this?

Yes it is probably a good idea, but I would suggest we have some
environment e.g. GDBUS_DEBUG to enable/disable it. Also while talking
to Johan about this he suggested to have some function to register the
callback/handler to log, so the projects using gdbus can register
their own function.


-- 
Luiz Augusto von Dentz

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: How about adding Dbus log in gdbus?
  2011-12-09 21:08 ` Luiz Augusto von Dentz
@ 2011-12-12 12:57   ` Chanyeol Park
  0 siblings, 0 replies; 3+ messages in thread
From: Chanyeol Park @ 2011-12-12 12:57 UTC (permalink / raw)
  To: Luiz Augusto von Dentz
  Cc: linux-bluetooth, 서호철,
	편도현

Hi
On 2011년 12월 10일 06:08, Luiz Augusto von Dentz wrote:
> Hi Chanyeol,
>
> 2011/12/9 Chanyeol Park<chanyeol.park@samsung.com>:
>> Hello
>>
>> How about adding dbus log in gdbus when we get method call from the remote
>> peer(application)?
>>
>> Personally It could be very useful for begginer.Based on it many people
>> could understand
>> call procedure easily. As far as I know this was removed when bluez 3.xx.
>> but compared to the days,
>> recently many dbus APIs have been introduced.
>>
>> But I know it is relatetd to many projects(bluez,obexd,connman,ofono).
>> So we need to consider a few things such as dependency managing and user
>> preference.
>> because curren gdbus does not have dependency with log.c/log.h.
>>
>> Is there good idea about this?
> Yes it is probably a good idea, but I would suggest we have some
> environment e.g. GDBUS_DEBUG to enable/disable it. Also while talking
> to Johan about this he suggested to have some function to register the
> callback/handler to log, so the projects using gdbus can register
> their own function.
Is it possible to relate this with bluez/obexd enable/disable debug feature?
Personally if we start to use environment variable(GDBUS_DEBUG), it 
would be difficult to use it.

Johan: Could you explain me what you think or suggest?

Thanks
Chanyeol Park


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-12-12 12:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-09 15:39 How about adding Dbus log in gdbus? Chanyeol Park
2011-12-09 21:08 ` Luiz Augusto von Dentz
2011-12-12 12:57   ` Chanyeol Park

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).