diff options
author | Paul Elder <paul.elder@ideasonboard.com> | 2019-07-13 00:09:51 +0900 |
---|---|---|
committer | Paul Elder <paul.elder@ideasonboard.com> | 2019-07-17 14:36:35 +0900 |
commit | b9f7e269b6be514ac520d061d8c9f6a0b1bbaded (patch) | |
tree | dd265801ce0be75dde50f9b30e996e7fbd0c4f9f /src/libcamera/include | |
parent | 8f0984f2cc176e66c422fd306e573e9b2efbf1fa (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 'src/libcamera/include')
-rw-r--r-- | src/libcamera/include/log.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/libcamera/include/log.h b/src/libcamera/include/log.h index 802836d2..9b203f97 100644 --- a/src/libcamera/include/log.h +++ b/src/libcamera/include/log.h @@ -60,12 +60,20 @@ public: std::ostream &stream() { return msgStream_; } + const struct timespec ×tamp() const { return timestamp_; } + LogSeverity severity() const { return severity_; } + const LogCategory &category() const { return category_; } + const std::string &fileInfo() const { return fileInfo_; } + const std::string msg() const { return msgStream_.str(); } + private: void init(const char *fileName, unsigned int line); std::ostringstream msgStream_; const LogCategory &category_; LogSeverity severity_; + struct timespec timestamp_; + std::string fileInfo_; }; class Loggable |