-void log_init(int level, const char *prefix, const char *name);
-void logf(int level, const char *fmt, ...);
-int log_mask_str (const char *str);
-FILE *log_file(void);
+YAZ_EXPORT void log_init(int level, const char *prefix, const char *name);
+YAZ_EXPORT void logf(int level, const char *fmt, ...);
+YAZ_EXPORT int log_mask_str (const char *str);
+YAZ_EXPORT int log_mask_str_x (const char *str, int level);
+YAZ_EXPORT FILE *log_file(void);
+
+YAZ_EXPORT void log_event_start (void (*func)(int level, const char *msg, void *info),
+ void *info);
+YAZ_EXPORT void log_event_end (void (*func)(int level, const char *msg, void *info),
+ void *info);
+
+#ifdef __cplusplus
+}
+#endif