-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.h
75 lines (61 loc) · 1.81 KB
/
config.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
/**
* \file
* \brief mulog configuration
* \author Vladimir Petrigo
*/
#ifndef CONFIG_H
#define CONFIG_H
#ifdef __cplusplus
extern "C" {
#endif
#include <stdbool.h>
#if !defined(MULOG_INTERNAL_CONFIG_PATH)
/**
* \brief Flag that specify whether to add timestamp to the log line
*/
#define MULOG_ENABLE_TIMESTAMP (MULOG_INTERNAL_ENABLE_TIMESTAMP_OUTPUT)
/**
* \brief Flag to control whether locking mechanism for thead-safety during logging operations
* is used or not
*/
#define MULOG_ENABLE_LOCKING (MULOG_INTERNAL_ENABLE_LOCKING)
/**
* \brief Define single log line size that will be extracted from a buffer
* for the deferred mode of operation
*/
#define MULOG_SINGLE_LOG_LINE_SIZE (MULOG_INTERNAL_SINGLE_LOG_LINE_SIZE)
/**
* \brief Flag that specify whether to enable color log lines
*/
#define MULOG_ENABLE_COLOR (MULOG_INTERNAL_ENABLE_COLOR_OUTPUT)
/**
* \brief Maximum number of output handlers that can be registered
*/
#define MULOG_OUTPUT_HANDLERS (MULOG_INTERNAL_OUTPUT_HANDLERS)
/**
* \brief Log line termination
*/
#define MULOG_LOG_LINE_TERMINATION "\n"
#else
#include MULOG_INTERNAL_CONFIG_PATH
#endif /* #if !defined(MULOG_INTERNAL_CONFIG_PATH) */
/**
* \brief External function that is used for getting time value
* \return Current system time value in milliseconds
*/
extern unsigned long mulog_config_mulog_timestamp_get(void);
/**
* \brief External function that is used for locking logger in a multi-thread environment
* \return Status of the lock operation
* \retval true Lock has been successfully acquired
* \retval false Lock has not been acquired
*/
extern bool mulog_config_mulog_lock(void);
/**
* \brief External function that is used for unlocking logger in a multi-thread environment
*/
extern void mulog_config_mulog_unlock(void);
#ifdef __cplusplus
}
#endif
#endif /* CONFIG_H */