forked from lit-robotics/libcamera-rs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlogging.h
39 lines (28 loc) · 906 Bytes
/
logging.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#ifndef __LIBCAMERA_C_LOGGING__
#define __LIBCAMERA_C_LOGGING__
#include <stdbool.h>
enum libcamera_logging_target {
LIBCAMERA_LOGGING_TARGET_NONE,
LIBCAMERA_LOGGING_TARGET_SYSLOG,
};
enum libcamera_logging_stream {
LIBCAMERA_LOGGING_STREAM_STDOUT,
LIBCAMERA_LOGGING_STREAM_STDERR,
};
typedef enum libcamera_logging_stream libcamera_logging_stream_t;
#ifdef __cplusplus
#include <ostream>
#include <libcamera/logging.h>
typedef libcamera::LoggingTarget libcamera_logging_target_t;
extern "C" {
#else
typedef enum libcamera_logging_target libcamera_logging_target_t;
#endif
int libcamera_log_set_file(const char *path, bool color);
int libcamera_log_set_stream(libcamera_logging_stream_t stream, bool color);
int libcamera_log_set_target(libcamera_logging_target_t target);
void libcamera_log_set_level(const char *category, const char *level);
#ifdef __cplusplus
}
#endif
#endif