milvus/cpp/src/utils/LogUtil.h
jinhai 94612238e5 MS-82 & MS-83 Update vecwise to Milvus
Former-commit-id: 69d1f1b661e6fc7779b4ae3abae60eeb28fa2b04
2019-06-13 16:02:25 +08:00

32 lines
840 B
C++

/*******************************************************************************
* Copyright 上海赜睿信息科技有限公司(Zilliz) - All Rights Reserved
* Unauthorized copying of this file, via any medium is strictly prohibited.
* Proprietary and confidential.
******************************************************************************/
#pragma once
#include <string>
#include <sstream>
namespace zilliz {
namespace milvus {
namespace server {
int32_t InitLog(const std::string& log_config_file);
inline std::string GetFileName(std::string filename) {
int pos = filename.find_last_of('/');
return filename.substr(pos + 1);
}
#define SHOW_LOCATION
#ifdef SHOW_LOCATION
#define LOCATION_INFO "[" << zilliz::sql::server::GetFileName(__FILE__) << ":" << __LINE__ << "] "
#else
#define LOCATION_INFO ""
#endif
}
}
}