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>
This commit is contained in:
@@ -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 */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user