Rename log to milvus_log (#16383)

Signed-off-by: yudong.cai <yudong.cai@zilliz.com>
pull/16390/head
Cai Yudong 2022-04-05 22:55:30 +08:00 committed by GitHub
parent 7323180861
commit 543ec4a209
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 12 additions and 38 deletions

View File

@ -20,6 +20,6 @@ add_library(milvus_common SHARED
${COMMON_SRC} ${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) install(TARGETS milvus_common DESTINATION lib)

View File

@ -18,9 +18,8 @@ set(CONFIG_SRC
ConfigKnowhere.cpp ConfigKnowhere.cpp
) )
add_library(milvus_config add_library(milvus_config STATIC ${CONFIG_SRC})
${CONFIG_SRC}
)
target_link_libraries(milvus_config target_link_libraries(milvus_config
knowhere knowhere
milvus_proto milvus_proto

View File

@ -18,5 +18,6 @@ set(exceptions_files
EasyAssert.cpp EasyAssert.cpp
) )
add_library(milvus_exceptions ${exceptions_files}) add_library(milvus_exceptions STATIC ${exceptions_files})
target_link_libraries(milvus_exceptions PRIVATE milvus_proto) target_link_libraries(milvus_exceptions PRIVATE milvus_proto)

View File

@ -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 } // namespace milvus::impl

View File

@ -35,9 +35,6 @@ EasyAssertInfo(bool value,
std::string_view extra_info, std::string_view extra_info,
ErrorCodeEnum error_code = ErrorCodeEnum::UnexpectedError); ErrorCodeEnum error_code = ErrorCodeEnum::UnexpectedError);
[[noreturn]] void
ThrowWithTrace(const std::exception& exception);
} // namespace impl } // namespace impl
class SegcoreError : public std::runtime_error { class SegcoreError : public std::runtime_error {

View File

@ -16,6 +16,6 @@ set(LOG_FILES ${MILVUS_ENGINE_SRC}/log/Log.cpp
${MILVUS_THIRDPARTY_SRC}/easyloggingpp/easylogging++.h ${MILVUS_THIRDPARTY_SRC}/easyloggingpp/easylogging++.h
) )
add_library(log STATIC ${LOG_FILES}) add_library(milvus_log STATIC ${LOG_FILES})
set_target_properties(log PROPERTIES RULE_LAUNCH_COMPILE "") set_target_properties(milvus_log PROPERTIES RULE_LAUNCH_COMPILE "")
set_target_properties(log PROPERTIES RULE_LAUNCH_LINK "") set_target_properties(milvus_log PROPERTIES RULE_LAUNCH_LINK "")

View File

@ -1,12 +0,0 @@
// Copyright (C) 2019-2020 Zilliz. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under the License
// is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
// or implied. See the License for the specific language governing permissions and limitations under the License
#include "Types.h"

View File

@ -11,8 +11,6 @@
#pragma once #pragma once
// #include <faiss/Index.h>
#include <cstdint> #include <cstdint>
#include <map> #include <map>
#include <memory> #include <memory>

View File

@ -62,7 +62,7 @@ if (LINUX)
milvus_segcore milvus_segcore
milvus_indexbuilder milvus_indexbuilder
milvus_index milvus_index
log milvus_log
pthread pthread
) )
install(TARGETS index_builder_test DESTINATION unittest) install(TARGETS index_builder_test DESTINATION unittest)
@ -93,7 +93,7 @@ target_link_libraries(all_tests
milvus_segcore milvus_segcore
milvus_indexbuilder milvus_indexbuilder
milvus_index milvus_index
log milvus_log
pthread pthread
) )

View File

@ -24,7 +24,7 @@ set(indexbuilder_bench_srcs
add_executable(all_bench ${bench_srcs}) add_executable(all_bench ${bench_srcs})
target_link_libraries(all_bench target_link_libraries(all_bench
milvus_segcore milvus_segcore
log milvus_log
pthread pthread
) )
@ -35,7 +35,7 @@ target_link_libraries(indexbuilder_bench
milvus_segcore milvus_segcore
milvus_indexbuilder milvus_indexbuilder
milvus_index milvus_index
log milvus_log
pthread pthread
knowhere knowhere
milvus_utils milvus_utils