From 6c8fc71eafb0f0bb069dba703c805a5247c917c7 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Thu, 12 Feb 2009 14:40:51 +0300 Subject: * Add log function to perl API * Prepare for more detailed work on rspamd perl API --- perl/rspamd.xs | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'perl/rspamd.xs') diff --git a/perl/rspamd.xs b/perl/rspamd.xs index 4dfc9e665..c7e1ae776 100644 --- a/perl/rspamd.xs +++ b/perl/rspamd.xs @@ -464,7 +464,7 @@ OUTPUT: RETVAL void -rspamd_task_get_module_param (r, modulename, paramname) +rspamd_config_get_module_param (r, modulename, paramname) CODE: struct config_file *r; char *module, *param, *value; @@ -483,3 +483,19 @@ rspamd_task_get_module_param (r, modulename, paramname) sv_setpv(TARG, value); ST(0) = TARG; + +MODULE = rspamd PACKAGE = rspamd_log PREFIX = rspamd_log_ +PROTOTYPES: DISABLE + +void +rspamd_log_log (level, str) + CODE: + int level; + char *str; + + level = (int)SvIV (ST(0)); + str = (char *)SvPV_nolen (ST(1)); + + g_log (G_LOG_DOMAIN, level, "%s", str); + XSRETURN_EMPTY; + -- cgit v1.2.3