-
Notifications
You must be signed in to change notification settings - Fork 41
Expand file tree
/
Copy pathlogging.h
More file actions
43 lines (32 loc) · 1.05 KB
/
logging.h
File metadata and controls
43 lines (32 loc) · 1.05 KB
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
40
41
42
43
#ifndef __LIBCAMERA_C_LOGGING__
#define __LIBCAMERA_C_LOGGING__
#include <stdbool.h>
enum libcamera_logging_target {
LIBCAMERA_LOGGING_TARGET_NONE,
LIBCAMERA_LOGGING_TARGET_SYSLOG,
LIBCAMERA_LOGGING_TARGET_FILE,
LIBCAMERA_LOGGING_TARGET_STREAM,
};
enum libcamera_logging_stream {
LIBCAMERA_LOGGING_STREAM_STDOUT,
LIBCAMERA_LOGGING_STREAM_STDERR,
LIBCAMERA_LOGGING_STREAM_CUSTOM,
};
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_custom_stream(void *ostream, 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