[Spice-devel] [PATCH spice-xpi 3/4] Switch from log4cpp to glib
Alon Levy
alevy at redhat.com
Fri Feb 24 11:34:13 PST 2012
On Fri, Feb 24, 2012 at 12:18:59PM +0100, Marc-André Lureau wrote:
> Hi
>
> On Fri, Feb 24, 2012 at 12:10 PM, Alon Levy <alevy at redhat.com> wrote:
> >
> > I was with you until you suggested to use ldpreload. Is there an actual
> > easy way to do this to redirect error messages somewhere?
>
> ldpreload can be useful if you want to override and use your own g_log
> handler for debugging. I don't mean it should be used as a solution,
> in production..
>
> You can redirect with normal redirection > | etc.. I use logger to
> redirect to syslog in the spice-xpi-client scripts for example.
>
> > So how would we make sure there is a log file for SpiceXPI?
>
> Tbh, I think there should be *no* log file, and it should use standard
> methods instead. stderr is redirected to .xsession-errors normally,
> but you should try to reproduce an issue by setting
> G_MESSAGES_DEBUG=SpiceXPI (and other domain), starting firefox and
> redirecting output to a file.
>
Sounds fine with me. ACK, with or without squashing the next. With what
Daniel said I'm fine with the series (although I would be happier if you
helped illuminate the actual changes in the spice-protocol submodule
patch by spliting out the autoconf no-ops as Daniel calls them).
>
> >> if (NPN_InvokeDefault(m_instance, call_on_disconnected, args, sizeof(args) / sizeof(args[0]), &void_result))
> >> - {
> >> - LOG_DEBUG("OnDisconnected successfuly called");
> >> - }
> >> + g_debug("OnDisconnected successfuly called");
> >
> > Why are you dropping the scope?
>
> Just saving 4 empty lines. I thought about rewriting it to one line
> without condition too, ex:
>
> g_debug("OnDisconnected: ", err != 0 ? "success" : "failed");
>
> --
> Marc-André Lureau
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel
More information about the Spice-devel
mailing list