From 7cb11ae2905c9caedd902c746f4d31ce4a6d8c0c Mon Sep 17 00:00:00 2001 From: stesen Date: Thu, 15 Jul 2021 17:07:43 +0800 Subject: [PATCH] change hilog part Signed-off-by: stesen Change-Id: I9fb16114f2af64b9cec03f1b0a184e36ade0bc34 --- adapter/BUILD.gn | 23 +---------- adapter/socket_server_adapter.cpp | 5 ++- frameworks/native/BUILD.gn | 29 +------------- frameworks/native/dgram_socket_client.cpp | 2 +- .../native/hilog_input_socket_client.cpp | 1 + frameworks/native/hilog_ndk/BUILD.gn | 4 +- interfaces/native/innerkits/BUILD.gn | 19 +-------- ohos.build | 39 +++++++------------ services/hilogd/BUILD.gn | 35 +---------------- services/hilogd/etc/BUILD.gn | 12 +----- services/hilogtool/BUILD.gn | 25 +----------- test/BUILD.gn | 2 +- 12 files changed, 28 insertions(+), 168 deletions(-) diff --git a/adapter/BUILD.gn b/adapter/BUILD.gn index 8326d82..42638e3 100644 --- a/adapter/BUILD.gn +++ b/adapter/BUILD.gn @@ -29,27 +29,6 @@ ohos_shared_library("libhilog_os_adapter") { ] install_enable = true - part_name = "hilog" - subsystem_name = "hiviewdfx" -} - -ohos_shared_library("libhilog_os_adapter_native") { - sources = [ - "properties.cpp", - "socket_server_adapter.cpp", - ] - - deps = [ "//utils/native/base:utilsecurec_shared" ] - - defines = [ "USING_EXISTING_SOCKET" ] - - include_dirs = [ - "//base/hiviewdfx/hilog/interfaces/native/innerkits/include", - "//base/hiviewdfx/hilog/adapter", - ] - - output_name = "libhilog_os_adapter" - install_enable = true - part_name = "hiviewdfx_hilog_native" + part_name = "hilog_native" subsystem_name = "hiviewdfx" } diff --git a/adapter/socket_server_adapter.cpp b/adapter/socket_server_adapter.cpp index 5eeeaa1..675676c 100644 --- a/adapter/socket_server_adapter.cpp +++ b/adapter/socket_server_adapter.cpp @@ -17,11 +17,12 @@ #include #include #include +#include #include #include #include #include -#include +#include #include #include @@ -117,4 +118,4 @@ int GetExistingSocketServer(const char *, int) { return -1; } -#endif \ No newline at end of file +#endif diff --git a/frameworks/native/BUILD.gn b/frameworks/native/BUILD.gn index a889292..4e5bffb 100644 --- a/frameworks/native/BUILD.gn +++ b/frameworks/native/BUILD.gn @@ -79,33 +79,6 @@ ohos_shared_library("libhilogutil") { output_extension = "so" install_enable = true - part_name = "hilog" - subsystem_name = "hiviewdfx" -} - -ohos_shared_library("libhilogutil_native") { - sources = [ - "dgram_socket_client.cpp", - "dgram_socket_server.cpp", - "format.cpp", - "seq_packet_socket_client.cpp", - "seq_packet_socket_server.cpp", - "socket.cpp", - "socket_client.cpp", - "socket_server.cpp", - ] - public_configs = [ ":libhilogutil_config" ] - configs = [ ":libhilogutil_config" ] - - deps = [ - "//base/hiviewdfx/hilog/adapter:libhilog_os_adapter_native", - "//utils/native/base:utilsecurec_shared", - ] - - output_name = "libhilogutil" - output_extension = "so" - install_enable = true - - part_name = "hiviewdfx_hilog_native" + part_name = "hilog_native" subsystem_name = "hiviewdfx" } diff --git a/frameworks/native/dgram_socket_client.cpp b/frameworks/native/dgram_socket_client.cpp index 85290be..dd723d0 100644 --- a/frameworks/native/dgram_socket_client.cpp +++ b/frameworks/native/dgram_socket_client.cpp @@ -15,7 +15,7 @@ #include "dgram_socket_client.h" -#include +#include namespace OHOS { namespace HiviewDFX { diff --git a/frameworks/native/hilog_input_socket_client.cpp b/frameworks/native/hilog_input_socket_client.cpp index 0a64145..a7f57bc 100644 --- a/frameworks/native/hilog_input_socket_client.cpp +++ b/frameworks/native/hilog_input_socket_client.cpp @@ -15,6 +15,7 @@ #include "hilog_input_socket_client.h" +#include #include #include diff --git a/frameworks/native/hilog_ndk/BUILD.gn b/frameworks/native/hilog_ndk/BUILD.gn index e45c037..cdea493 100644 --- a/frameworks/native/hilog_ndk/BUILD.gn +++ b/frameworks/native/hilog_ndk/BUILD.gn @@ -21,8 +21,8 @@ ohos_shared_library("hilog_ndk") { sources = [ "hilog_ndk.c" ] - external_deps = [ "hilog:libhilog" ] + external_deps = [ "hilog_native:libhilog" ] - part_name = "hilog" + part_name = "hilog_native" subsystem_name = "hiviewdfx" } diff --git a/interfaces/native/innerkits/BUILD.gn b/interfaces/native/innerkits/BUILD.gn index 32ce60e..3f610d7 100644 --- a/interfaces/native/innerkits/BUILD.gn +++ b/interfaces/native/innerkits/BUILD.gn @@ -31,23 +31,6 @@ ohos_shared_library("libhilog") { output_extension = "so" install_enable = true - part_name = "hilog" - subsystem_name = "hiviewdfx" -} - -ohos_shared_library("libhilog_native") { - public_configs = [ ":libhilog_pub_config" ] - - deps = [ - "//base/hiviewdfx/hilog/adapter:libhilog_os_adapter_native", - "//base/hiviewdfx/hilog/frameworks/native:libhilog_source", - "//utils/native/base:utilsecurec_shared", - ] - - output_name = "libhilog" - output_extension = "so" - install_enable = true - - part_name = "hiviewdfx_hilog_native" + part_name = "hilog_native" subsystem_name = "hiviewdfx" } diff --git a/ohos.build b/ohos.build index e9316b2..f17894e 100644 --- a/ohos.build +++ b/ohos.build @@ -1,13 +1,19 @@ { "subsystem": "hiviewdfx", "parts": { + "hiviewdfx_hilog_native": { + "module_list": [] + }, "hilog": { "module_list": [ - "//base/hiviewdfx/hilog:hilog_target", + "//base/hiviewdfx/hilog:hilog_target" + ] + }, + "hilog_native": { + "module_list": [ "//base/hiviewdfx/hilog/frameworks/native/hilog_ndk:hilog_ndk", - "//base/hiviewdfx/hilog/interfaces/native/innerkits:libhilog", - "//base/hiviewdfx/hilog/services/hilogtool:hilog", - "//base/hiviewdfx/hilog/services/hilogd:hilogd" + "//base/hiviewdfx/hilog/frameworks/native:libhilogutil", + "//base/hiviewdfx/hilog/interfaces/native/innerkits:libhilog" ], "inner_kits": [ { @@ -21,35 +27,16 @@ "header_base": "//base/hiviewdfx/hilog/interfaces/native/innerkits/include" } } - ], - "test_list": [ - "//base/hiviewdfx/hilog/test:moduletest" ] }, - "hiviewdfx_hilog_native": { + "hilog_service": { "variants": [ "phone", "wearable" ], "module_list": [ - "//base/hiviewdfx/hilog/interfaces/native/innerkits:libhilog_native", - "//base/hiviewdfx/hilog/frameworks/native:libhilogutil_native", - "//base/hiviewdfx/hilog/adapter:libhilog_os_adapter_native", - "//base/hiviewdfx/hilog/services/hilogtool:hilog_native", - "//base/hiviewdfx/hilog/services/hilogd:hilogd_native" - ], - "inner_kits": [ - { - "name": "//base/hiviewdfx/hilog/interfaces/native/innerkits:libhilog", - "header": { - "header_files": [ - "hilog/log.h", - "hilog/log_c.h", - "hilog/log_cpp.h" - ], - "header_base": "//base/hiviewdfx/hilog/interfaces/native/innerkits/include" - } - } + "//base/hiviewdfx/hilog/services/hilogtool:hilog", + "//base/hiviewdfx/hilog/services/hilogd:hilogd" ] } } diff --git a/services/hilogd/BUILD.gn b/services/hilogd/BUILD.gn index a0e4359..6b70342 100644 --- a/services/hilogd/BUILD.gn +++ b/services/hilogd/BUILD.gn @@ -47,39 +47,6 @@ ohos_executable("hilogd") { deps += [ "etc:hilogd_etc" ] install_enable = true - part_name = "hilog" + part_name = "hilog_service" subsystem_name = "hiviewdfx" } - -ohos_executable("hilogd_native") { - sources = [ - "cmd_executor.cpp", - "compressing_rotator.cpp", - "flow_control_init.cpp", - "log_buffer.cpp", - "log_collector.cpp", - "log_compress.cpp", - "log_persister.cpp", - "log_persister_rotator.cpp", - "log_querier.cpp", - "log_reader.cpp", - "main.cpp", - ] - - configs = [ ":hilogd_config" ] - - deps = [ - "//base/hiviewdfx/hilog/adapter:libhilog_os_adapter_native", - "//base/hiviewdfx/hilog/frameworks/native:libhilogutil", - "//base/hiviewdfx/hilog/interfaces/native/innerkits:libhilog", - "//third_party/zlib:libz", - "//utils/native/base:utilsecurec_shared", - ] - - deps += [ "etc:hilogd_etc" ] - - output_name = "hilogd" - install_enable = true - part_name = "hiviewdfx_hilog_native" - subsystem_name = "hiviewdfx" -} \ No newline at end of file diff --git a/services/hilogd/etc/BUILD.gn b/services/hilogd/etc/BUILD.gn index 5dcf51c..4108d21 100644 --- a/services/hilogd/etc/BUILD.gn +++ b/services/hilogd/etc/BUILD.gn @@ -22,21 +22,13 @@ group("hilogd_etc") { ohos_prebuilt_etc("hilog_domains.conf") { source = "hilog_domains.conf" - if (is_standard_system) { - part_name = "hiviewdfx_hilog_native" - } else { - part_name = "hilog" - } + part_name = "hilog_service" subsystem_name = "hiviewdfx" } ohos_prebuilt_etc("hilogd.rc") { source = "hilogd.rc" relative_install_dir = "init" - if (is_standard_system) { - part_name = "hiviewdfx_hilog_native" - } else { - part_name = "hilog" - } + part_name = "hilog_service" subsystem_name = "hiviewdfx" } diff --git a/services/hilogtool/BUILD.gn b/services/hilogtool/BUILD.gn index f9ecaff..82d50dc 100644 --- a/services/hilogtool/BUILD.gn +++ b/services/hilogtool/BUILD.gn @@ -37,29 +37,6 @@ ohos_executable("hilog") { ] install_enable = true - part_name = "hilog" - subsystem_name = "hiviewdfx" -} - -ohos_executable("hilog_native") { - sources = [ - "log_controller.cpp", - "log_display.cpp", - "main.cpp", - ] - - configs = [ ":hilog_config" ] - - deps = [ - "//base/hiviewdfx/hilog/adapter:libhilog_os_adapter_native", - "//base/hiviewdfx/hilog/frameworks/native:libhilogutil", - "//base/hiviewdfx/hilog/interfaces/native/innerkits:libhilog", - "//third_party/zlib:libz", - "//utils/native/base:utilsecurec_shared", - ] - - output_name = "hilog" - install_enable = true - part_name = "hiviewdfx_hilog_native" + part_name = "hilog_service" subsystem_name = "hiviewdfx" } diff --git a/test/BUILD.gn b/test/BUILD.gn index 0ed750c..a3e4683 100644 --- a/test/BUILD.gn +++ b/test/BUILD.gn @@ -31,7 +31,7 @@ ohos_moduletest("HiLogNDKTest") { "//utils/native/base:utils", ] - external_deps = [ "hilog:libhilog" ] + external_deps = [ "hilog_native:libhilog" ] include_dirs = [ "//base/hiviewdfx/hilog/interfaces/native/innerkits/include", -- Gitee