[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Linphone-developers] g_warning vs. vtable.display_warning
From: |
Simon Morlat |
Subject: |
Re: [Linphone-developers] g_warning vs. vtable.display_warning |
Date: |
Fri, 27 Jan 2006 00:20:01 +0100 |
User-agent: |
KMail/1.9.1 |
Le Jeudi 26 Janvier 2006 11:26, strk a écrit :
> Having done some more tests I'm convinced linphone core
> should use its own warning/message/error functions.
The logging system is a problematic applicable to any kind of software, so it
does not have its place into the LinphoneCore object.
The glib has an api for tracing (g_message/g_warning/g_error/g_log) which is
quite good. It even allows the user of this api to set a logger function,
that every g_message/g_warning/g_error will call to display the message once
it is formatted. The api allows also to set the verbosity level by
enabling/disabling messages according to their type (message/warning/error),
or their logging domain.
So I really think we should not keep logging api and user interaction
distinct.
The logging api displays things for the developer or the bug hunter while the
LinphoneCore api displays things about the calls/registration and so on for
the end user only.
Simon
>
> In this way use of the functions set in the virtual
> table can be triggered by both availability of them
> (!=NULL) and possibly other settings (verbosity level?).
>
> --strk;
>
> On Thu, Jan 26, 2006 at 02:43:15AM +0100, strk wrote:
> > linphonecore.c contains many invokations of g_warning(msg).
> > I don't get those messages from the command line interface,
> > and I'm not sure the GUI does in any way.
> >
> > Would it be correct to substitute all g_warning() occurrences
> > with LinephoneCore.vtable.display_warning() instead ?
> >
> > There are already two uses of it.
> > One is to warn about UDP port being in use
> > and the other about invalid sip address.
> >
> > Note that the second one checks for the vtable entry
> > to be non-null, while the first doesn't. What would
> > the correct way be ?
> >
> > --strk;
>
> _______________________________________________
> Linphone-developers mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/linphone-developers