aboutsummaryrefslogtreecommitdiffstats
path: root/shell/evolution-shell-component-client.c
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2001-03-31 00:39:46 +0800
committerDan Winship <danw@src.gnome.org>2001-03-31 00:39:46 +0800
commitbfdcfc7949e01f47ee4d39de425a993033c413b0 (patch)
tree2c088c5655c9c608fb4756da5f1fd6213b7b5212 /shell/evolution-shell-component-client.c
parent911f4543a29d5a5ba99a5b1e6f9a847bc06fb78b (diff)
downloadgsoc2013-evolution-bfdcfc7949e01f47ee4d39de425a993033c413b0.tar.gz
gsoc2013-evolution-bfdcfc7949e01f47ee4d39de425a993033c413b0.tar.zst
gsoc2013-evolution-bfdcfc7949e01f47ee4d39de425a993033c413b0.zip
add a "debug" method to tell a component to output debugging messages to a
* Evolution-ShellComponent.idl: add a "debug" method to tell a component to output debugging messages to a given file. * main.c (main): Add a "--debug filename" argument, to direct debugging output for all components to a file. Redirect the shell's stdout/stderr to that file if this argument is used. * evolution-shell-component-client.c (evolution_shell_component_client_set_owner): If debug_log is set, call the component's debug method as well. * evolution-shell-component.c (impl_ShellComponent_debug): redirect stdout/stderr to the named file and emit a "debug" signal. svn path=/trunk/; revision=9046
Diffstat (limited to 'shell/evolution-shell-component-client.c')
-rw-r--r--shell/evolution-shell-component-client.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/shell/evolution-shell-component-client.c b/shell/evolution-shell-component-client.c
index 7f35d8571f..1a4ba17916 100644
--- a/shell/evolution-shell-component-client.c
+++ b/shell/evolution-shell-component-client.c
@@ -38,6 +38,8 @@
#include "evolution-shell-component-client.h"
+extern char *debug_log;
+
#define PARENT_TYPE BONOBO_OBJECT_CLIENT_TYPE
static BonoboObjectClass *parent_class = NULL;
@@ -471,6 +473,9 @@ evolution_shell_component_client_set_owner (EvolutionShellComponentClient *shell
result = corba_exception_to_result (&ev);
+ if (result == EVOLUTION_SHELL_COMPONENT_OK && debug_log)
+ GNOME_Evolution_ShellComponent_debug (bonobo_object_corba_objref (BONOBO_OBJECT (shell_component_client)), debug_log, &ev);
+
CORBA_exception_free (&ev);
return result;