summaryrefslogtreecommitdiffstats
path: root/bindings/php5/wrapper_source_top.c
diff options
context:
space:
mode:
Diffstat (limited to 'bindings/php5/wrapper_source_top.c')
-rw-r--r--bindings/php5/wrapper_source_top.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/bindings/php5/wrapper_source_top.c b/bindings/php5/wrapper_source_top.c
index 1b6bec7e..67a279a4 100644
--- a/bindings/php5/wrapper_source_top.c
+++ b/bindings/php5/wrapper_source_top.c
@@ -7,6 +7,28 @@
#include <lasso/lasso.h>
#include "php_lasso.h"
#include "../ghashtable.h"
+#define LASSO_LOG_STATIC
+
+#if defined(__GNUC__)
+# define lasso_log(level, filename, line, function, format, args...) \
+ g_log("Lasso", level, "%s:%i:%s" format, filename, line, function, ##args)
+#elif defined(HAVE_VARIADIC_MACROS)
+# define lasso_log(level, format, line, function, ...) \
+ g_log("Lasso", leve, "%s:%i:%s" format, filename, line, function, __VA_ARGS__)
+#else
+static inline void lasso_log(GLogLevelFlags level, const char *filename,
+ int line, const char *function, const char *format, ...)
+{
+ va_list ap;
+ char s[1024];
+ va_start(ap, format);
+ g_vsnprintf(s, 1024, format, ap);
+ va_end(ap);
+ g_log("Lasso", level, "%s:%i:%s %s", filename, line, function, s);
+}
+#define lasso_log lasso_log
+#endif
+
#include "../../lasso/utils.h"
#include "../utils.c"