API参考
载入中...
搜索中...
未找到
bsl_log_internal.h
1
/*
2
* This file is part of the openHiTLS project.
3
*
4
* openHiTLS is licensed under the Mulan PSL v2.
5
* You can use this software according to the terms and conditions of the Mulan PSL v2.
6
* You may obtain a copy of Mulan PSL v2 at:
7
*
8
* http://license.coscl.org.cn/MulanPSL2
9
*
10
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
11
* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
12
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
13
* See the Mulan PSL v2 for more details.
14
*/
15
16
#ifndef BSL_LOG_INTERNAL_H
17
#define BSL_LOG_INTERNAL_H
18
19
#include <stdint.h>
20
#include "hitls_build.h"
21
#include "bsl_log.h"
22
23
#ifdef __cplusplus
24
extern
"C"
{
25
#endif
26
27
#ifdef HITLS_BSL_LOG
28
#ifdef HITLS_BSL_LOG_NO_FORMAT_STRING
29
#define LOG_STR(str) NULL
30
#else
31
#define LOG_STR(str) (str)
32
#endif
33
34
#define BSL_LOG_BUF_SIZE 1024U
35
52
void
BSL_LOG_BinLogFixLen(uint32_t logId, uint32_t logLevel, uint32_t logType,
53
void
*format,
void
*para1,
void
*para2,
void
*para3,
void
*para4);
54
67
void
BSL_LOG_BinLogVarLen(uint32_t logId, uint32_t logLevel, uint32_t logType,
void
*format,
void
*para);
68
84
#define BSL_LOG_BINLOG_FIXLEN(logId, logLevel, logType, format, para1, para2, para3, para4) \
85
BSL_LOG_BinLogFixLen(logId, logLevel, logType, \
86
(void *)(uintptr_t)(const void *)(LOG_STR(format)), (void *)(uintptr_t)(para1), (void *)(uintptr_t)(para2), \
87
(void *)(uintptr_t)(para3), (void *)(uintptr_t)(para4))
88
100
#define BSL_LOG_BINLOG_VARLEN(logId, logLevel, logType, format, para) \
101
BSL_LOG_BinLogVarLen(logId, logLevel, logType, \
102
(void *)(uintptr_t)(const void *)(LOG_STR(format)), (void *)(uintptr_t)(const void *)(para))
103
104
#else
105
106
#define BSL_LOG_BINLOG_FIXLEN(logId, logLevel, logType, format, para1, para2, para3, para4)
107
#define BSL_LOG_BINLOG_VARLEN(logId, logLevel, logType, format, para)
108
109
#endif
/* HITLS_BSL_LOG */
110
111
#ifdef __cplusplus
112
}
113
#endif
114
115
#endif
// BSL_LOG_INTERNAL_H
bsl
log
include
bsl_log_internal.h
制作者
1.15.0