Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Startup Init Lite
提交
38c0e3c2
S
Startup Init Lite
项目概览
OpenHarmony
/
Startup Init Lite
1 年多 前同步成功
通知
3
Star
37
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
Startup Init Lite
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
38c0e3c2
编写于
3月 31, 2022
作者:
X
xionglei6
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix:log fix
Signed-off-by:
N
xionglei6
<
xionglei6@huawei.com
>
上级
ade5a69f
变更
11
隐藏空白更改
内联
并排
Showing
11 changed file
with
91 addition
and
56 deletion
+91
-56
device_info/idevice_info.h
device_info/idevice_info.h
+7
-3
interfaces/innerkits/BUILD.gn
interfaces/innerkits/BUILD.gn
+4
-2
interfaces/innerkits/include/beget_ext.h
interfaces/innerkits/include/beget_ext.h
+20
-11
services/begetctl/shell/shell_utils.h
services/begetctl/shell/shell_utils.h
+7
-4
services/log/init_log.c
services/log/init_log.c
+11
-14
services/log/init_log.h
services/log/init_log.h
+12
-7
services/loopevent/utils/le_utils.h
services/loopevent/utils/le_utils.h
+6
-3
services/param/include/param_utils.h
services/param/include/param_utils.h
+6
-3
services/param/watcher/include/watcher_utils.h
services/param/watcher/include/watcher_utils.h
+6
-3
services/plugin/plugin_adapter.h
services/plugin/plugin_adapter.h
+6
-3
test/plugintest/plugin_test.h
test/plugintest/plugin_test.h
+6
-3
未找到文件。
device_info/idevice_info.h
浏览文件 @
38c0e3c2
...
...
@@ -39,9 +39,13 @@ public:
}
// namespace device_info
}
// namespace OHOS
#define DINFO_LOGI(fmt, ...) STARTUP_LOGI("begetctrl.log", "DeviceInfoKits", fmt, ##__VA_ARGS__)
#define DINFO_LOGE(fmt, ...) STARTUP_LOGE("begetctrl.log", "DeviceInfoKits", fmt, ##__VA_ARGS__)
#define DINFO_LOGV(fmt, ...) STARTUP_LOGV("begetctrl.log", "DeviceInfoKits", fmt, ##__VA_ARGS__)
#ifndef DINFO_DOMAIN
#define DINFO_DOMAIN (BASE_DOMAIN + 8)
#endif
#define DINFO_LOGI(fmt, ...) STARTUP_LOGI(DINFO_DOMAIN, "DeviceInfoKits", fmt, ##__VA_ARGS__)
#define DINFO_LOGE(fmt, ...) STARTUP_LOGE(DINFO_DOMAIN, "DeviceInfoKits", fmt, ##__VA_ARGS__)
#define DINFO_LOGV(fmt, ...) STARTUP_LOGV(DINFO_DOMAIN, "DeviceInfoKits", fmt, ##__VA_ARGS__)
#define DINFO_CHECK(ret, exper, ...) \
if
(
!
(
ret
))
{
\
...
...
interfaces/innerkits/BUILD.gn
浏览文件 @
38c0e3c2
...
...
@@ -36,7 +36,7 @@ ohos_shared_library("libbegetutil") {
"syscap/init_syscap.c",
]
sources += fs_manager_sources
defines = [ "INIT_AGENT"
]
defines = [ "INIT_AGENT"]
include_dirs = [
"./include",
"//third_party/bounds_checking_function/include",
...
...
@@ -67,6 +67,7 @@ ohos_shared_library("libbeget_proxy") {
sources = [
"//base/startup/init_lite/device_info/device_info_kits.cpp",
"//base/startup/init_lite/device_info/device_info_proxy.cpp",
"//base/startup/init_lite/services/log/init_log.c",
"service_watcher/service_watcher.c",
]
...
...
@@ -80,8 +81,8 @@ ohos_shared_library("libbeget_proxy") {
"//third_party/bounds_checking_function/include",
]
defines = [ "INIT_AGENT"]
deps = [
"//base/startup/init_lite/services/log:agent_log",
"//base/startup/init_lite/services/param/watcher:param_watcheragent",
"//base/startup/init_lite/services/utils:libinit_utils",
"//third_party/bounds_checking_function:libsec_shared",
...
...
@@ -89,6 +90,7 @@ ohos_shared_library("libbeget_proxy") {
]
external_deps = [
"hilog_native:libhilog_base",
"ipc:ipc_core",
"safwk:system_ability_fwk",
"samgr_standard:samgr_proxy",
...
...
interfaces/innerkits/include/beget_ext.h
浏览文件 @
38c0e3c2
...
...
@@ -35,22 +35,31 @@ typedef enum InitLogLevel {
#define FILE_NAME (strrchr((__FILE__), '/') ? strrchr((__FILE__), '/') + 1 : (__FILE__))
void
SetInitLogLevel
(
InitLogLevel
logLevel
);
void
InitLog
(
InitLogLevel
logLevel
,
const
char
*
domain
,
const
char
*
fileName
,
int
line
,
const
char
*
fmt
,
...);
void
InitLog
(
InitLogLevel
logLevel
,
unsigned
int
domain
,
const
char
*
tag
,
const
char
*
fmt
,
...);
#define STARTUP_LOGV(domain, fmt, ...) InitLog(INIT_DEBUG, domain, (FILE_NAME), (__LINE__), fmt, ##__VA_ARGS__)
#define STARTUP_LOGI(domain, fmt, ...) InitLog(INIT_INFO, domain, (FILE_NAME), (__LINE__), fmt, ##__VA_ARGS__)
#define STARTUP_LOGW(domain, fmt, ...) InitLog(INIT_WARN, domain, (FILE_NAME), (__LINE__), fmt, ##__VA_ARGS__)
#define STARTUP_LOGE(domain, fmt, ...) InitLog(INIT_ERROR, domain, (FILE_NAME), (__LINE__), fmt, ##__VA_ARGS__)
#define STARTUP_LOGF(domain, fmt, ...) InitLog(INIT_FATAL, domain, (FILE_NAME), (__LINE__), fmt, ##__VA_ARGS__)
#define STARTUP_LOGV(domain, tag, fmt, ...) \
InitLog(INIT_DEBUG, domain, tag, "[%s:%d]" fmt, (FILE_NAME), (__LINE__), ##__VA_ARGS__)
#define STARTUP_LOGI(domain, tag, fmt, ...) \
InitLog(INIT_INFO, domain, tag, "[%s:%d]" fmt, (FILE_NAME), (__LINE__), ##__VA_ARGS__)
#define STARTUP_LOGW(domain, tag, fmt, ...) \
InitLog(INIT_WARN, domain, tag, "[%s:%d]" fmt, (FILE_NAME), (__LINE__), ##__VA_ARGS__)
#define STARTUP_LOGE(domain, tag, fmt, ...) \
InitLog(INIT_ERROR, domain, tag, "[%s:%d]" fmt, (FILE_NAME), (__LINE__), ##__VA_ARGS__)
#define STARTUP_LOGF(domain, tag, fmt, ...) \
InitLog(INIT_FATAL, domain, tag, "[%s:%d]" fmt, (FILE_NAME), (__LINE__), ##__VA_ARGS__)
#define BASE_DOMAIN 0xA000
#ifndef BEGET_DOMAIN
#define BEGET_DOMAIN BASE_DOMAIN + 0xb
#endif
#define BEGET_LABEL "BEGET"
#define BEGET_LOGI(fmt, ...) STARTUP_LOGI(BEGET_LABEL, fmt, ##__VA_ARGS__)
#define BEGET_LOGE(fmt, ...) STARTUP_LOGE(BEGET_LABEL, fmt, ##__VA_ARGS__)
#define BEGET_LOGV(fmt, ...) STARTUP_LOGV(BEGET_LABEL, fmt, ##__VA_ARGS__)
#define BEGET_LOGW(fmt, ...) STARTUP_LOGW(BEGET_LABEL, fmt, ##__VA_ARGS__)
#define BEGET_LOGI(fmt, ...) STARTUP_LOGI(BEGET_
DOMAIN, BEGET_
LABEL, fmt, ##__VA_ARGS__)
#define BEGET_LOGE(fmt, ...) STARTUP_LOGE(BEGET_
DOMAIN, BEGET_
LABEL, fmt, ##__VA_ARGS__)
#define BEGET_LOGV(fmt, ...) STARTUP_LOGV(BEGET_
DOMAIN, BEGET_
LABEL, fmt, ##__VA_ARGS__)
#define BEGET_LOGW(fmt, ...) STARTUP_LOGW(BEGET_
DOMAIN, BEGET_
LABEL, fmt, ##__VA_ARGS__)
#define InitLogPrint(outFileName, logLevel, kLevel, fmt, ...) \
InitLog(logLevel, BEGET_
LABEL, (FILE_NAME), (__LINE__)
, fmt, ##__VA_ARGS__)
InitLog(logLevel, BEGET_
DOMAIN, kLevel
, fmt, ##__VA_ARGS__)
#define BEGET_ERROR_CHECK(ret, statement, format, ...) \
if (!(ret)) { \
...
...
services/begetctl/shell/shell_utils.h
浏览文件 @
38c0e3c2
...
...
@@ -22,11 +22,14 @@
#include "init_log.h"
#include "securec.h"
#define BSH_LOG_FILE "begetctrl.log"
#define BSH_LABEL "SHELL"
#define BSH_LOGI(fmt, ...) STARTUP_LOGI(BSH_LABEL, fmt, ##__VA_ARGS__)
#define BSH_LOGE(fmt, ...) STARTUP_LOGE(BSH_LABEL, fmt, ##__VA_ARGS__)
#define BSH_LOGV(fmt, ...) STARTUP_LOGV(BSH_LABEL, fmt, ##__VA_ARGS__)
#ifndef BSH_DOMAIN
#define BSH_DOMAIN (BASE_DOMAIN + 5)
#endif
#define BSH_LOGI(fmt, ...) STARTUP_LOGI(BSH_DOMAIN, BSH_LABEL, fmt, ##__VA_ARGS__)
#define BSH_LOGE(fmt, ...) STARTUP_LOGE(BSH_DOMAIN, BSH_LABEL, fmt, ##__VA_ARGS__)
#define BSH_LOGV(fmt, ...) STARTUP_LOGV(BSH_DOMAIN, BSH_LABEL, fmt, ##__VA_ARGS__)
#define BSH_CHECK(ret, exper, ...) \
if
(
!
(
ret
))
{
\
...
...
services/log/init_log.c
浏览文件 @
38c0e3c2
...
...
@@ -39,7 +39,7 @@ void SetInitLogLevel(InitLogLevel logLevel)
}
#ifdef INIT_FILE
static
void
LogToFile
(
const
char
*
logFile
,
const
char
*
fileName
,
int
line
,
const
char
*
info
)
static
void
LogToFile
(
const
char
*
logFile
,
const
char
*
tag
,
const
char
*
info
)
{
time_t
second
=
time
(
0
);
if
(
second
<=
0
)
{
...
...
@@ -50,9 +50,8 @@ static void LogToFile(const char *logFile, const char *fileName, int line, const
if
(
t
==
NULL
||
outfile
==
NULL
)
{
return
;
}
(
void
)
fprintf
(
outfile
,
"[%d-%d-%d %d:%d:%d][pid=%d][%s:%d]%s
\n
"
,
(
t
->
tm_year
+
BASE_YEAR
),
(
t
->
tm_mon
+
1
),
t
->
tm_mday
,
t
->
tm_hour
,
t
->
tm_min
,
t
->
tm_sec
,
getpid
(),
fileName
,
line
,
info
);
(
void
)
fprintf
(
outfile
,
"[%d-%d-%d %d:%d:%d][pid=%d][%s]%s
\n
"
,
(
t
->
tm_year
+
BASE_YEAR
),
(
t
->
tm_mon
+
1
),
t
->
tm_mday
,
t
->
tm_hour
,
t
->
tm_min
,
t
->
tm_sec
,
getpid
(),
tag
,
info
);
(
void
)
fflush
(
outfile
);
fclose
(
outfile
);
return
;
...
...
@@ -71,7 +70,7 @@ void OpenLogDevice(void)
return
;
}
void
LogToDmesg
(
InitLogLevel
logLevel
,
const
char
*
domain
,
const
char
*
fileName
,
int
line
,
const
char
*
info
)
void
LogToDmesg
(
InitLogLevel
logLevel
,
const
char
*
tag
,
const
char
*
info
)
{
static
const
char
*
LOG_LEVEL_STR
[]
=
{
"DEBUG"
,
"INFO"
,
"WARNING"
,
"ERROR"
,
"FATAL"
};
static
const
char
*
LOG_KLEVEL_STR
[]
=
{
"<7>"
,
"<6>"
,
"<4>"
,
"<3>"
,
"<3>"
};
...
...
@@ -83,8 +82,8 @@ void LogToDmesg(InitLogLevel logLevel, const char *domain, const char *fileName,
}
}
char
logInfo
[
MAX_LOG_SIZE
];
if
(
snprintf_s
(
logInfo
,
MAX_LOG_SIZE
,
MAX_LOG_SIZE
-
1
,
"%s[pid=%d %d][%s][%s]
[%s:%d]
%s"
,
LOG_KLEVEL_STR
[
logLevel
],
getpid
(),
getppid
(),
domain
,
LOG_LEVEL_STR
[
logLevel
],
fileName
,
line
,
info
)
==
-
1
)
{
if
(
snprintf_s
(
logInfo
,
MAX_LOG_SIZE
,
MAX_LOG_SIZE
-
1
,
"%s[pid=%d %d][%s][%s]%s"
,
LOG_KLEVEL_STR
[
logLevel
],
getpid
(),
getppid
(),
tag
,
LOG_LEVEL_STR
[
logLevel
]
,
info
)
==
-
1
)
{
close
(
g_fd
);
g_fd
=
-
1
;
return
;
...
...
@@ -98,7 +97,7 @@ void LogToDmesg(InitLogLevel logLevel, const char *domain, const char *fileName,
#endif
#endif
void
InitLog
(
InitLogLevel
logLevel
,
const
char
*
domain
,
const
char
*
fileName
,
int
line
,
const
char
*
fmt
,
...)
void
InitLog
(
InitLogLevel
logLevel
,
unsigned
int
domain
,
const
char
*
tag
,
const
char
*
fmt
,
...)
{
if
(
g_logLevel
>
logLevel
)
{
return
;
...
...
@@ -113,20 +112,18 @@ void InitLog(InitLogLevel logLevel, const char *domain, const char *fileName, in
va_end
(
vargs
);
#ifdef OHOS_LITE
static
LogLevel
LOG_LEVEL
[]
=
{
LOG_DEBUG
,
LOG_INFO
,
LOG_WARN
,
LOG_ERROR
,
LOG_FATAL
};
(
void
)
HiLogPrint
(
LOG_CORE
,
LOG_LEVEL
[
logLevel
],
domain
,
INIT_LOG_TAG
,
"[%{public}s:%{public}d]%{public}s"
,
fileName
,
line
,
tmpFmt
);
(
void
)
HiLogPrint
(
LOG_CORE
,
LOG_LEVEL
[
logLevel
],
domain
,
tag
,
"%{public}s"
,
tmpFmt
);
#else
#ifdef INIT_DMESG
LogToDmesg
(
logLevel
,
domain
,
fileName
,
line
,
tmpFmt
);
LogToDmesg
(
logLevel
,
tag
,
tmpFmt
);
#endif
#endif
#ifdef INIT_AGENT
static
LogLevel
LOG_LEVEL
[]
=
{
LOG_DEBUG
,
LOG_INFO
,
LOG_WARN
,
LOG_ERROR
,
LOG_FATAL
};
HiLogBasePrint
(
LOG_CORE
,
LOG_LEVEL
[
logLevel
],
0
,
domain
,
"[%{public}s:%d]%{public}s"
,
fileName
,
line
,
tmpFmt
);
HiLogBasePrint
(
LOG_CORE
,
LOG_LEVEL
[
logLevel
],
domain
,
tag
,
"%{public}s"
,
tmpFmt
);
#ifdef INIT_FILE
LogToFile
(
"/data/init_agent/begetctl.log"
,
fileName
,
line
,
tmpFmt
);
LogToFile
(
"/data/init_agent/begetctl.log"
,
tag
,
tmpFmt
);
#endif
#endif
}
services/log/init_log.h
浏览文件 @
38c0e3c2
...
...
@@ -32,17 +32,22 @@ extern "C" {
#define INIT_LOG_TAG "Init"
#endif
#ifndef INIT_DOMAIN
#define INIT_
DOMAIN "Init"
#ifndef INIT_
LOG_
DOMAIN
#define INIT_
LOG_DOMAIN BASE_DOMAIN + 1
#endif
void
OpenLogDevice
(
void
);
#define INIT_LOGV(fmt, ...) InitLog(INIT_DEBUG, INIT_DOMAIN, (FILE_NAME), (__LINE__), fmt, ##__VA_ARGS__)
#define INIT_LOGI(fmt, ...) InitLog(INIT_INFO, INIT_DOMAIN, (FILE_NAME), (__LINE__), fmt, ##__VA_ARGS__)
#define INIT_LOGW(fmt, ...) InitLog(INIT_WARN, INIT_DOMAIN, (FILE_NAME), (__LINE__), fmt, ##__VA_ARGS__)
#define INIT_LOGE(fmt, ...) InitLog(INIT_ERROR, INIT_DOMAIN, (FILE_NAME), (__LINE__), fmt, ##__VA_ARGS__)
#define INIT_LOGF(fmt, ...) InitLog(INIT_FATAL, INIT_DOMAIN, (FILE_NAME), (__LINE__), fmt, ##__VA_ARGS__)
#define INIT_LOGV(fmt, ...) \
InitLog
(
INIT_DEBUG
,
INIT_LOG_DOMAIN
,
INIT_LOG_TAG
,
"[%s:%d]"
fmt
,
(
FILE_NAME
),
(
__LINE__
),
##
__VA_ARGS__
)
#define INIT_LOGI(fmt, ...) \
InitLog
(
INIT_INFO
,
INIT_LOG_DOMAIN
,
INIT_LOG_TAG
,
"[%s:%d]"
fmt
,
(
FILE_NAME
),
(
__LINE__
),
##
__VA_ARGS__
)
#define INIT_LOGW(fmt, ...) \
InitLog
(
INIT_WARN
,
INIT_LOG_DOMAIN
,
INIT_LOG_TAG
,
"[%s:%d]"
fmt
,
(
FILE_NAME
),
(
__LINE__
),
##
__VA_ARGS__
)
#define INIT_LOGE(fmt, ...) \
InitLog
(
INIT_ERROR
,
INIT_LOG_DOMAIN
,
INIT_LOG_TAG
,
"[%s:%d]"
fmt
,
(
FILE_NAME
),
(
__LINE__
),
##
__VA_ARGS__
)
#define INIT_LOGF(fmt, ...) \
InitLog
(
INIT_FATAL
,
INIT_LOG_DOMAIN
,
INIT_LOG_TAG
,
"[%s:%d]"
fmt
,
(
FILE_NAME
),
(
__LINE__
),
##
__VA_ARGS__
)
#ifndef UNLIKELY
#define UNLIKELY(x) __builtin_expect(!!(x), 0)
...
...
services/loopevent/utils/le_utils.h
浏览文件 @
38c0e3c2
...
...
@@ -27,10 +27,13 @@
#define LE_SET_FLAGS(flags, flag) ((flags) |= (flag))
#define LE_CLEAR_FLAGS(flags, flag) ((flags) &= ~(flag))
#ifndef LE_DOMAIN
#define LE_DOMAIN (BASE_DOMAIN + 4)
#endif
#define LE_LABEL "LoopEvent"
#define LE_LOGI(fmt, ...) STARTUP_LOGI(LE_LABEL, fmt, ##__VA_ARGS__)
#define LE_LOGE(fmt, ...) STARTUP_LOGE(LE_LABEL, fmt, ##__VA_ARGS__)
#define LE_LOGV(fmt, ...) STARTUP_LOGV(LE_LABEL, fmt, ##__VA_ARGS__)
#define LE_LOGI(fmt, ...) STARTUP_LOGI(LE_
DOMAIN, LE_
LABEL, fmt, ##__VA_ARGS__)
#define LE_LOGE(fmt, ...) STARTUP_LOGE(LE_
DOMAIN, LE_
LABEL, fmt, ##__VA_ARGS__)
#define LE_LOGV(fmt, ...) STARTUP_LOGV(LE_
DOMAIN, LE_
LABEL, fmt, ##__VA_ARGS__)
#define LE_CHECK(ret, exper, ...) \
if
(
!
(
ret
))
{
\
...
...
services/param/include/param_utils.h
浏览文件 @
38c0e3c2
...
...
@@ -80,10 +80,13 @@ typedef enum {
#define PARAM_CLEAR_FLAG(node, flag) ((node) &= ~(flag))
#define PARAM_TEST_FLAG(node, flag) (((node) & (flag)) == (flag))
#ifndef PARAN_DOMAIN
#define PARAN_DOMAIN (BASE_DOMAIN + 2)
#endif
#define PARAN_LABEL "PARAM"
#define PARAM_LOGI(fmt, ...) STARTUP_LOGI(PARAN_LABEL, fmt, ##__VA_ARGS__)
#define PARAM_LOGE(fmt, ...) STARTUP_LOGE(PARAN_LABEL, fmt, ##__VA_ARGS__)
#define PARAM_LOGV(fmt, ...) STARTUP_LOGV(PARAN_LABEL, fmt, ##__VA_ARGS__)
#define PARAM_LOGI(fmt, ...) STARTUP_LOGI(PARAN_
DOMAIN, PARAN_
LABEL, fmt, ##__VA_ARGS__)
#define PARAM_LOGE(fmt, ...) STARTUP_LOGE(PARAN_
DOMAIN, PARAN_
LABEL, fmt, ##__VA_ARGS__)
#define PARAM_LOGV(fmt, ...) STARTUP_LOGV(PARAN_
DOMAIN, PARAN_
LABEL, fmt, ##__VA_ARGS__)
#define PARAM_CHECK(retCode, exper, ...) \
if
(
!
(
retCode
))
{
\
...
...
services/param/watcher/include/watcher_utils.h
浏览文件 @
38c0e3c2
...
...
@@ -26,10 +26,13 @@
namespace
OHOS
{
namespace
init_param
{
#define UNUSED(x) (void)(x)
#ifndef WATCHER_DOMAIN
#define WATCHER_DOMAIN (BASE_DOMAIN + 3)
#endif
#define WATCHER_LABEL "PARAM_WATCHER"
#define WATCHER_LOGI(fmt, ...) STARTUP_LOGI(WATCHER_LABEL, fmt, ##__VA_ARGS__)
#define WATCHER_LOGE(fmt, ...) STARTUP_LOGE(WATCHER_LABEL, fmt, ##__VA_ARGS__)
#define WATCHER_LOGV(fmt, ...) STARTUP_LOGV(WATCHER_LABEL, fmt, ##__VA_ARGS__)
#define WATCHER_LOGI(fmt, ...) STARTUP_LOGI(WATCHER_
DOMAIN, WATCHER_
LABEL, fmt, ##__VA_ARGS__)
#define WATCHER_LOGE(fmt, ...) STARTUP_LOGE(WATCHER_
DOMAIN, WATCHER_
LABEL, fmt, ##__VA_ARGS__)
#define WATCHER_LOGV(fmt, ...) STARTUP_LOGV(WATCHER_
DOMAIN, WATCHER_
LABEL, fmt, ##__VA_ARGS__)
#define WATCHER_CHECK(retCode, exper, ...) \
if (!(retCode)) { \
...
...
services/plugin/plugin_adapter.h
浏览文件 @
38c0e3c2
...
...
@@ -28,11 +28,14 @@ typedef struct {
int
index
;
}
PluginCmd
;
#ifndef PLUGIN_DOMAIN
#define PLUGIN_DOMAIN (BASE_DOMAIN + 6)
#endif
#define READ_DURATION 100000
#define PLUGIN_LABEL "PLUGIN"
#define PLUGIN_LOGI(fmt, ...) STARTUP_LOGI(PLUGIN_LABEL, fmt, ##__VA_ARGS__)
#define PLUGIN_LOGE(fmt, ...) STARTUP_LOGE(PLUGIN_LABEL, fmt, ##__VA_ARGS__)
#define PLUGIN_LOGV(fmt, ...) STARTUP_LOGV(PLUGIN_LABEL, fmt, ##__VA_ARGS__)
#define PLUGIN_LOGI(fmt, ...) STARTUP_LOGI(PLUGIN_
DOMAIN, PLUGIN_
LABEL, fmt, ##__VA_ARGS__)
#define PLUGIN_LOGE(fmt, ...) STARTUP_LOGE(PLUGIN_
DOMAIN, PLUGIN_
LABEL, fmt, ##__VA_ARGS__)
#define PLUGIN_LOGV(fmt, ...) STARTUP_LOGV(PLUGIN_
DOMAIN, PLUGIN_
LABEL, fmt, ##__VA_ARGS__)
#define PLUGIN_CHECK(ret, exper, ...) \
if
(
!
(
ret
))
{
\
...
...
test/plugintest/plugin_test.h
浏览文件 @
38c0e3c2
...
...
@@ -22,11 +22,14 @@
#include "init_log.h"
#include "securec.h"
#ifndef PLUGIN_DOMAIN
#define PLUGIN_DOMAIN (BASE_DOMAIN + 7)
#endif
#define READ_DURATION 100000
#define PLUGIN_LABEL "PLUGIN"
#define PLUGIN_LOGI(fmt, ...) STARTUP_LOGI(PLUGIN_LABEL, fmt, ##__VA_ARGS__)
#define PLUGIN_LOGE(fmt, ...) STARTUP_LOGE(PLUGIN_LABEL, fmt, ##__VA_ARGS__)
#define PLUGIN_LOGV(fmt, ...) STARTUP_LOGV(PLUGIN_LABEL, fmt, ##__VA_ARGS__)
#define PLUGIN_LOGI(fmt, ...) STARTUP_LOGI(PLUGIN_
DOMAIN, PLUGIN_
LABEL, fmt, ##__VA_ARGS__)
#define PLUGIN_LOGE(fmt, ...) STARTUP_LOGE(PLUGIN_
DOMAIN, PLUGIN_
LABEL, fmt, ##__VA_ARGS__)
#define PLUGIN_LOGV(fmt, ...) STARTUP_LOGV(PLUGIN_
DOMAIN, PLUGIN_
LABEL, fmt, ##__VA_ARGS__)
#define PLUGIN_CHECK(ret, exper, ...) \
if
(
!
(
ret
))
{
\
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录