[collectd] [PATCH] perl plugin: Log the perl error messages if bootstrapping Collectd failed.

Sebastian Harl sh at tokkee.org
Tue Sep 16 15:36:18 CEST 2008


Signed-off-by: Sebastian Harl <sh at tokkee.org>
---
 src/perl.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/src/perl.c b/src/perl.c
index 6d95082..bb62267 100644
--- a/src/perl.c
+++ b/src/perl.c
@@ -1561,7 +1561,9 @@ static int init_pi (int argc, char **argv)
 	PL_exit_flags |= PERL_EXIT_DESTRUCT_END;
 
 	if (0 != perl_parse (aTHX_ xs_init, argc, argv, NULL)) {
-		log_err ("init_pi: Unable to bootstrap Collectd.");
+		SV *err = get_sv ("@", 1);
+		log_err ("init_pi: Unable to bootstrap Collectd: %s",
+				SvPV_nolen (err));
 
 		perl_destruct (perl_threads->head->interp);
 		perl_free (perl_threads->head->interp);
-- 
1.6.0.1.216.g1b23a

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://mailman.verplant.org/pipermail/collectd/attachments/20080916/74c24d51/attachment.pgp 


More information about the collectd mailing list