mirror of https://github.com/milvus-io/milvus.git
MS-573 Enable log in knowhere
Former-commit-id: 7b60e5fc6edcaabea9e967ba4f3312a17533c986pull/191/head
parent
ad1fe081f0
commit
029d4a97b3
|
@ -22,6 +22,9 @@ set(basic_libs
|
|||
gomp gfortran pthread
|
||||
)
|
||||
|
||||
set(util_srcs
|
||||
${MILVUS_ENGINE_SRC}/utils/easylogging++.cc
|
||||
)
|
||||
|
||||
#<IVF-TEST>
|
||||
set(ivf_srcs
|
||||
|
@ -35,7 +38,7 @@ set(ivf_srcs
|
|||
utils.cpp
|
||||
)
|
||||
if(NOT TARGET test_ivf)
|
||||
add_executable(test_ivf test_ivf.cpp ${ivf_srcs})
|
||||
add_executable(test_ivf test_ivf.cpp ${ivf_srcs} ${util_srcs})
|
||||
endif()
|
||||
target_link_libraries(test_ivf ${depend_libs} ${unittest_libs} ${basic_libs})
|
||||
|
||||
|
@ -51,7 +54,7 @@ set(idmap_srcs
|
|||
utils.cpp
|
||||
)
|
||||
if(NOT TARGET test_idmap)
|
||||
add_executable(test_idmap test_idmap.cpp ${idmap_srcs})
|
||||
add_executable(test_idmap test_idmap.cpp ${idmap_srcs} ${util_srcs})
|
||||
endif()
|
||||
target_link_libraries(test_idmap ${depend_libs} ${unittest_libs} ${basic_libs})
|
||||
|
||||
|
@ -68,7 +71,7 @@ set(kdt_srcs
|
|||
utils.cpp
|
||||
)
|
||||
if(NOT TARGET test_kdt)
|
||||
add_executable(test_kdt test_kdt.cpp ${kdt_srcs})
|
||||
add_executable(test_kdt test_kdt.cpp ${kdt_srcs} ${util_srcs})
|
||||
endif()
|
||||
target_link_libraries(test_kdt
|
||||
SPTAGLibStatic
|
||||
|
|
|
@ -34,6 +34,7 @@ if(NOT TARGET test_nsg)
|
|||
test_nsg.cpp
|
||||
${interface_src}
|
||||
${nsg_src}
|
||||
${util_srcs}
|
||||
)
|
||||
endif()
|
||||
|
||||
|
|
|
@ -18,6 +18,15 @@
|
|||
|
||||
#include "utils.h"
|
||||
|
||||
INITIALIZE_EASYLOGGINGPP
|
||||
|
||||
void InitLog() {
|
||||
el::Configurations defaultConf;
|
||||
defaultConf.setToDefault();
|
||||
defaultConf.set(el::Level::Debug,
|
||||
el::ConfigurationType::Format, "[%thread-%datetime-%level]: %msg (%fbase:%line)");
|
||||
el::Loggers::reconfigureLogger("default", defaultConf);
|
||||
}
|
||||
|
||||
void DataGen::Init_with_default() {
|
||||
Generate(dim, nb, nq);
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include <fstream>
|
||||
|
||||
#include "knowhere/adapter/structure.h"
|
||||
#include "knowhere/common/Log.h"
|
||||
|
||||
class DataGen {
|
||||
protected:
|
||||
|
@ -65,6 +66,8 @@ extern void GenBase(const int64_t &dim,
|
|||
float *xb,
|
||||
int64_t *ids);
|
||||
|
||||
extern void InitLog();
|
||||
|
||||
zilliz::knowhere::DatasetPtr
|
||||
generate_dataset(int64_t nb, int64_t dim, float *xb, long *ids);
|
||||
|
||||
|
|
Loading…
Reference in New Issue