diff options
author | Paul Elder <paul.elder@ideasonboard.com> | 2019-07-11 18:30:07 +0900 |
---|---|---|
committer | Paul Elder <paul.elder@ideasonboard.com> | 2019-07-12 13:46:48 +0900 |
commit | 60f5d472d96c9c1ffcb1887bd760bcee3c09ec2a (patch) | |
tree | fe763074927cb62a8e4edd1c1da03588b1a7259d /include | |
parent | b50c5f28b14e2fb14d4de0c088949e1405d22c6a (diff) |
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 <paul.elder@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/libcamera/logging.h | 17 | ||||
-rw-r--r-- | include/libcamera/meson.build | 1 |
2 files changed, 18 insertions, 0 deletions
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__ */ diff --git a/include/libcamera/meson.build b/include/libcamera/meson.build index 972513fc..920eb5fc 100644 --- a/include/libcamera/meson.build +++ b/include/libcamera/meson.build @@ -9,6 +9,7 @@ libcamera_api = files([ 'geometry.h', 'ipa/ipa_interface.h', 'ipa/ipa_module_info.h', + 'logging.h', 'object.h', 'request.h', 'signal.h', |