LogUtil.h 899 字节
Newer Older
G
groot 已提交
1 2 3 4 5 6 7 8 9 10 11
/*******************************************************************************
 * 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 {
J
jinhai 已提交
12
namespace milvus {
G
groot 已提交
13
namespace server {
G
groot 已提交
14
int32_t InitLog(const std::string& log_config_file);
G
groot 已提交
15 16 17 18
inline std::string GetFileName(std::string filename) {
    int pos = filename.find_last_of('/');
    return filename.substr(pos + 1);
}
H
Heisenberg 已提交
19
void RolloutHandler(const char *filename, std::size_t size);
G
groot 已提交
20 21 22 23 24 25 26 27 28 29 30

#define SHOW_LOCATION
#ifdef SHOW_LOCATION
#define LOCATION_INFO "[" << zilliz::sql::server::GetFileName(__FILE__) << ":" << __LINE__ << "] "
#else
#define LOCATION_INFO ""
#endif

}
}
}