+#if HAVE_DLOG
+static int log_append_dlog(const struct lxc_log_appender *appender,
+ struct lxc_log_event *event)
+{
+ if (event->priority < LXC_LOG_LEVEL_ERROR)
+ return 0;
+
+ switch(event->priority) {
+ case LXC_LOG_LEVEL_TRACE:
+ case LXC_LOG_LEVEL_DEBUG:
+ LOG_VA(LOG_DEBUG, LOG_TAG, event->fmt, *event->vap);
+ break;
+ case LXC_LOG_LEVEL_INFO:
+ LOG_VA(LOG_INFO, LOG_TAG, event->fmt, *event->vap);
+ break;
+ case LXC_LOG_LEVEL_NOTICE:
+ case LXC_LOG_LEVEL_WARN:
+ LOG_VA(LOG_WARN, LOG_TAG, event->fmt, *event->vap);
+ break;
+ case LXC_LOG_LEVEL_ERROR:
+ LOG_VA(LOG_ERROR, LOG_TAG, event->fmt, *event->vap);
+ break;
+ case LXC_LOG_LEVEL_CRIT:
+ case LXC_LOG_LEVEL_ALERT:
+ case LXC_LOG_LEVEL_FATAL:
+ LOG_VA(LOG_FATAL, LOG_TAG, event->fmt, *event->vap);
+ break;
+ default:
+ break;
+ }
+
+ return 0;
+}
+#endif
+