From 60f5d472d96c9c1ffcb1887bd760bcee3c09ec2a Mon Sep 17 00:00:00 2001 From: Paul Elder Date: Thu, 11 Jul 2019 18:30:07 +0900 Subject: libcamera: logging: add logging API for applications Currently the log file and the log level can only be set via environment variables, but applications may also want to set the log file and the log level at run time. Provide an API for this. Signed-off-by: Paul Elder Reviewed-by: Laurent Pinchart --- include/libcamera/logging.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 include/libcamera/logging.h (limited to 'include/libcamera/logging.h') diff --git a/include/libcamera/logging.h b/include/libcamera/logging.h new file mode 100644 index 00000000..a8495cf6 --- /dev/null +++ b/include/libcamera/logging.h @@ -0,0 +1,17 @@ +/* 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 { + +void logSetFile(const char *file); +int logSetLevel(const char *category, const char *level); + +} /* namespace libcamera */ + +#endif /* __LIBCAMERA_LOGGING_H__ */ -- cgit v1.2.1