mirror of
https://git.libcamera.org/libcamera/libcamera.git
synced 2025-07-15 08:25:07 +03:00
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>
26 lines
569 B
C++
26 lines
569 B
C++
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
|
/*
|
|
* Copyright (C) 2019, Google Inc.
|
|
*
|
|
* logging.h - Logging infrastructure
|
|
*/
|
|
#ifndef __LIBCAMERA_LOGGING_H__
|
|
#define __LIBCAMERA_LOGGING_H__
|
|
|
|
namespace libcamera {
|
|
|
|
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 */
|
|
|
|
#endif /* __LIBCAMERA_LOGGING_H__ */
|