supla-device
Loading...
Searching...
No Matches
src
supla
debug
debug_log.h
1
// SPDX-FileCopyrightText: AC SOFTWARE SP. Z O.O.
2
// SPDX-License-Identifier: GPL-2.0-or-later
3
4
#ifndef SRC_SUPLA_DEBUG_DEBUG_LOG_H_
5
#define SRC_SUPLA_DEBUG_DEBUG_LOG_H_
6
7
#include <stdint.h>
8
9
#include <supla/debug/debug_config.h>
10
11
#ifdef __cplusplus
12
namespace
Supla {
13
namespace
Debug {
14
15
class
LogSink {
16
public
:
17
virtual
~LogSink() =
default
;
18
virtual
void
writeLog(
int
priority,
const
char
*message) = 0;
19
};
20
21
void
setLogSink(LogSink *sink);
22
void
clearLogSink(LogSink *sink);
23
void
writeLog(
int
priority,
const
char
*message);
24
const
char
*logPriorityPrefix(
int
priority);
25
26
}
// namespace Debug
27
}
// namespace Supla
28
29
extern
"C"
void
supla_debug_log_write(
int
priority,
const
char
*message);
30
extern
"C"
void
supla_debug_logf(
int
priority,
const
char
*format, ...);
31
#else
32
void
supla_debug_log_write(
int
priority,
const
char
*message);
33
void
supla_debug_logf(
int
priority,
const
char
*format, ...);
34
#endif
35
36
#endif
// SRC_SUPLA_DEBUG_DEBUG_LOG_H_
Generated by
1.12.0