+static void discovery_log_cb(AvahiLogLevel level, const char *txt)
+{
+ meshlink_log_level_t mlevel = MESHLINK_CRITICAL;
+
+ switch(level)
+ {
+ case AVAHI_LOG_ERROR:
+ mlevel = MESHLINK_ERROR;
+ break;
+
+ case AVAHI_LOG_WARN:
+ mlevel = MESHLINK_WARNING;
+ break;
+
+ case AVAHI_LOG_NOTICE:
+ case AVAHI_LOG_INFO:
+ mlevel = MESHLINK_INFO;
+ break;
+
+ case AVAHI_LOG_DEBUG:
+ mlevel = MESHLINK_DEBUG;
+ break;
+ }
+
+ logger(NULL, mlevel, "%s\n", txt);
+}
+