forked from free-audio/clap
/
log.h
33 lines (26 loc) · 744 Bytes
/
log.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
#pragma once
#include "../plugin.h"
static CLAP_CONSTEXPR const char CLAP_EXT_LOG[] = "clap.log";
#ifdef __cplusplus
extern "C" {
#endif
enum {
CLAP_LOG_DEBUG = 0,
CLAP_LOG_INFO = 1,
CLAP_LOG_WARNING = 2,
CLAP_LOG_ERROR = 3,
CLAP_LOG_FATAL = 4,
// These severities should be used to report misbehaviour.
// The plugin one can be used by a layer between the plugin and the host.
CLAP_LOG_HOST_MISBEHAVING = 5,
CLAP_LOG_PLUGIN_MISBEHAVING = 6,
};
typedef int32_t clap_log_severity;
typedef struct clap_host_log {
// Log a message through the host.
// [thread-safe]
void(CLAP_ABI *log)(const clap_host_t *host, clap_log_severity severity, const char *msg);
} clap_host_log_t;
#ifdef __cplusplus
}
#endif