summaryrefslogtreecommitdiff
path: root/include/libcamera/logging.h
diff options
context:
space:
mode:
authorPaul Elder <paul.elder@ideasonboard.com>2019-07-13 00:09:51 +0900
committerPaul Elder <paul.elder@ideasonboard.com>2019-07-17 14:36:35 +0900
commitb9f7e269b6be514ac520d061d8c9f6a0b1bbaded (patch)
treedd265801ce0be75dde50f9b30e996e7fbd0c4f9f /include/libcamera/logging.h
parent8f0984f2cc176e66c422fd306e573e9b2efbf1fa (diff)
libcamera: logging: add syslog, stream, and nowhere logging targets
Allow logging to syslog, or any given ostream, or to nowhere. The logging API is updated to accomodate these new logging destinations. LogMessage is modified to allow this. Signed-off-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'include/libcamera/logging.h')
-rw-r--r--include/libcamera/logging.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/include/libcamera/logging.h b/include/libcamera/logging.h
index a8495cf6..2b6dd3f4 100644
--- a/include/libcamera/logging.h
+++ b/include/libcamera/logging.h
@@ -9,8 +9,17 @@
namespace libcamera {
-void logSetFile(const char *file);
-int logSetLevel(const char *category, const char *level);
+enum LoggingTarget {
+ LoggingTargetNone,
+ LoggingTargetSyslog,
+ LoggingTargetFile,
+ LoggingTargetStream,
+};
+
+int logSetFile(const char *path);
+int logSetStream(std::ostream *stream);
+int logSetTarget(LoggingTarget target);
+void logSetLevel(const char *category, const char *level);
} /* namespace libcamera */