[Goodies-dev] plugin development and logging information
Mike Massonnet
mmassonnet at gmail.com
Wed Feb 13 14:14:01 CET 2008
On Wed, Feb 13, 2008 at 12:23:28PM +0100, Jannis Pohlmann wrote:
> Am Wed, 13 Feb 2008 08:41:19 +0100
> schrieb lidiriel <lidiriel at coriolys.org>:
>
> > Hello the list,
> >
> > how to get a logging/debug information in a plugin ?
> > I would like use a loggging system for check a internal plugin data.
> > Like fprintf(stderr," .... ");
> > or a xfce macro if exist like DEBUG("my info to log");
> > I thank the stderr was redirect into .xsession-error but i am not
> > sure. If someone have a tutorial, a link or a short example, this was
> > very cool !
>
> I think Brian wrote about it on spuriousinterrupt.org some time, but
> I'm unable to find it right now.
That was from Landry and is on the wiki[0].
Lidiriel, as I understand you are also looking for debug output. Run
xfce4-panel in a terminal, and all plugins that have debugging support
will print their output there.
--enable-debug will output DBG, and --enable-debug=full will output
TRACE furthermore. You will need to include config.h and libxfce4util.
Here is an example:
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <libxfce4util/libxfce4util.h>
Note that you don't have to use these macros, but instead can rely on
g_debug[1].
> - Jannis
mike
[0] http://wiki.xfce.org/howto/panel_plugin_debug
[1] http://library.gnome.org/devel/glib/unstable/glib-Message-Logging.html
More information about the Goodies-dev
mailing list