Allow redirecting logging to an FD

This change allows redirection of logging facilities, from syslog to a
file.

Bug: None
Test: make tests  // see logging in stderr
Change-Id: Ia45ccb87908f1d4a2f7964a01d11a74da6e9fdb7
diff --git a/libminijail.h b/libminijail.h
index 15fa124..f1cb346 100644
--- a/libminijail.h
+++ b/libminijail.h
@@ -339,6 +339,16 @@
  */
 void minijail_destroy(struct minijail *j);
 
+/*
+ * minijail_log_to_fd: redirects the module-wide logging to an FD instead of
+ * syslog.
+ * @fd           FD to log to. Caller must ensure this is available after
+ *               jailing (e.g. with minijail_preserve_fd()).
+ * @min_priority the minimum logging priority. Same as the priority argument
+ *               to syslog(2).
+ */
+void minijail_log_to_fd(int fd, int min_priority);
+
 #ifdef __cplusplus
 }; /* extern "C" */
 #endif