From: luozheng <1732036298@qq.com> Date: Mon, 25 Nov 2024 09:42:14 +0000 (+0800) Subject: 验证离线日志保存问题 X-Git-Tag: fd230_release_V1.3.102~29^2~2 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=af107612e4d405e47df652b75fd6e95946318de3;p=mirrors%2FFD230.git 验证离线日志保存问题 1.在对应目录CMakeLists添加: set(MODULE_NAME "app") set(AUTO_DEF_FILE_ID TRUE) 2.DIAG日志日志打印对应文件加上关键打印即可 注意目前只开放error和warning级别的打印 --- diff --git a/code/sdk/application/wearable/service/msg_center/CMakeLists.txt b/code/sdk/application/wearable/service/msg_center/CMakeLists.txt index 26c5bcb67..b477a2fa7 100644 --- a/code/sdk/application/wearable/service/msg_center/CMakeLists.txt +++ b/code/sdk/application/wearable/service/msg_center/CMakeLists.txt @@ -1,4 +1,6 @@ set(COMPONENT_NAME "msg_center") +set(MODULE_NAME "app") +set(AUTO_DEF_FILE_ID TRUE) set(PUBLIC_HEADER ${CMAKE_CURRENT_SOURCE_DIR}/include diff --git a/code/sdk/application/wearable/service/msg_center/src/notify/debug_output_notification/debug_output_notification.cpp b/code/sdk/application/wearable/service/msg_center/src/notify/debug_output_notification/debug_output_notification.cpp index 13ffba3d5..2f3eb3706 100644 --- a/code/sdk/application/wearable/service/msg_center/src/notify/debug_output_notification/debug_output_notification.cpp +++ b/code/sdk/application/wearable/service/msg_center/src/notify/debug_output_notification/debug_output_notification.cpp @@ -58,6 +58,7 @@ #include #include "displaybrightness/include/DisplayBrightnessModel.h" #include "ppg_service.h" +#include "diag_log.h" namespace OHOS { /**************************************************************************************************** */ @@ -822,7 +823,10 @@ namespace OHOS break; case 17: str = get_offline_log_status(); - if (toggleButtonOffline) { + uapi_diag_info_log(0, "test out info log. value = %d", 1); + uapi_diag_error_log(0, "test out error log. a = %d, b = %d\r\n", 3, 4); + uapi_diag_warning_log(0, "test out warning log. a = %d, b = %d c= 0x%x",3, 4, 5); + if (toggleButtonOffline) { if (toggleButtonOffline->IsVisible() == false) { toggleButtonOffline->SetVisible(true); toggleButtonOffline->SetViewId("offline_log_switch");