Skip to content

Commit

Permalink
Rename log to milvus_log (#16383)
Browse files Browse the repository at this point in the history
Signed-off-by: yudong.cai <yudong.cai@zilliz.com>
  • Loading branch information
cydrain authored Apr 5, 2022
1 parent 7323180 commit 543ec4a
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 38 deletions.
2 changes: 1 addition & 1 deletion internal/core/src/common/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ add_library(milvus_common SHARED
${COMMON_SRC}
)

target_link_libraries(milvus_common milvus_utils milvus_config log knowhere milvus_proto yaml-cpp )
target_link_libraries(milvus_common milvus_utils milvus_config milvus_log knowhere milvus_proto yaml-cpp )

install(TARGETS milvus_common DESTINATION lib)
5 changes: 2 additions & 3 deletions internal/core/src/config/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@ set(CONFIG_SRC
ConfigKnowhere.cpp
)

add_library(milvus_config
${CONFIG_SRC}
)
add_library(milvus_config STATIC ${CONFIG_SRC})

target_link_libraries(milvus_config
knowhere
milvus_proto
Expand Down
3 changes: 2 additions & 1 deletion internal/core/src/exceptions/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,6 @@ set(exceptions_files
EasyAssert.cpp
)

add_library(milvus_exceptions ${exceptions_files})
add_library(milvus_exceptions STATIC ${exceptions_files})

target_link_libraries(milvus_exceptions PRIVATE milvus_proto)
9 changes: 0 additions & 9 deletions internal/core/src/exceptions/EasyAssert.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,4 @@ EasyAssertInfo(bool value,
}
}

[[noreturn]] void
ThrowWithTrace(const std::exception& exception) {
if (typeid(exception) == typeid(SegcoreError)) {
throw exception;
}
auto err_msg = exception.what() + std::string("\n") + EasyStackTrace();
throw SegcoreError(ErrorCodeEnum::UnexpectedError, err_msg);
}

} // namespace milvus::impl
3 changes: 0 additions & 3 deletions internal/core/src/exceptions/EasyAssert.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,6 @@ EasyAssertInfo(bool value,
std::string_view extra_info,
ErrorCodeEnum error_code = ErrorCodeEnum::UnexpectedError);

[[noreturn]] void
ThrowWithTrace(const std::exception& exception);

} // namespace impl

class SegcoreError : public std::runtime_error {
Expand Down
6 changes: 3 additions & 3 deletions internal/core/src/log/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ set(LOG_FILES ${MILVUS_ENGINE_SRC}/log/Log.cpp
${MILVUS_THIRDPARTY_SRC}/easyloggingpp/easylogging++.h
)

add_library(log STATIC ${LOG_FILES})
set_target_properties(log PROPERTIES RULE_LAUNCH_COMPILE "")
set_target_properties(log PROPERTIES RULE_LAUNCH_LINK "")
add_library(milvus_log STATIC ${LOG_FILES})
set_target_properties(milvus_log PROPERTIES RULE_LAUNCH_COMPILE "")
set_target_properties(milvus_log PROPERTIES RULE_LAUNCH_LINK "")
12 changes: 0 additions & 12 deletions internal/core/src/utils/Types.cpp

This file was deleted.

2 changes: 0 additions & 2 deletions internal/core/src/utils/Types.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@

#pragma once

// #include <faiss/Index.h>

#include <cstdint>
#include <map>
#include <memory>
Expand Down
4 changes: 2 additions & 2 deletions internal/core/unittest/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ if (LINUX)
milvus_segcore
milvus_indexbuilder
milvus_index
log
milvus_log
pthread
)
install(TARGETS index_builder_test DESTINATION unittest)
Expand Down Expand Up @@ -93,7 +93,7 @@ target_link_libraries(all_tests
milvus_segcore
milvus_indexbuilder
milvus_index
log
milvus_log
pthread
)

Expand Down
4 changes: 2 additions & 2 deletions internal/core/unittest/bench/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ set(indexbuilder_bench_srcs
add_executable(all_bench ${bench_srcs})
target_link_libraries(all_bench
milvus_segcore
log
milvus_log
pthread
)

Expand All @@ -35,7 +35,7 @@ target_link_libraries(indexbuilder_bench
milvus_segcore
milvus_indexbuilder
milvus_index
log
milvus_log
pthread
knowhere
milvus_utils
Expand Down

0 comments on commit 543ec4a

Please sign in to comment.