mirror of
https://github.com/yanyiwu/cppjieba.git
synced 2025-07-18 00:00:12 +08:00
[limonp] to version v0.5.2, fix incompatibility problem in Windows
This commit is contained in:
parent
eb12813194
commit
0482ec2b6c
@ -1,5 +1,9 @@
|
||||
# CppJieba ChangeLog
|
||||
|
||||
## next version
|
||||
|
||||
+ [limonp] to version v0.5.2, fix incompatibility problem in Windows
|
||||
|
||||
## v4.3.1
|
||||
|
||||
+ 重载 KeywordExtractor 的构造函数,可以传入 Jieba 进行字典和模型的构造。
|
||||
|
14
deps/limonp/Logging.hpp
vendored
14
deps/limonp/Logging.hpp
vendored
@ -13,17 +13,17 @@
|
||||
#error "CHECK has been defined already"
|
||||
#endif // CHECK
|
||||
|
||||
#define LOG(level) limonp::Logger(limonp::level, __FILE__, __LINE__).Stream()
|
||||
#define LOG(level) limonp::Logger(limonp::LL_##level, __FILE__, __LINE__).Stream()
|
||||
#define CHECK(exp) if(!(exp)) LOG(FATAL) << "exp: ["#exp << "] false. "
|
||||
|
||||
namespace limonp {
|
||||
|
||||
enum {
|
||||
DEBUG = 0,
|
||||
INFO = 1,
|
||||
WARNING = 2,
|
||||
ERROR = 3,
|
||||
FATAL = 4,
|
||||
LL_DEBUG = 0,
|
||||
LL_INFO = 1,
|
||||
LL_WARNING = 2,
|
||||
LL_ERROR = 3,
|
||||
LL_FATAL = 4,
|
||||
}; // enum
|
||||
|
||||
static const char * LOG_LEVEL_ARRAY[] = {"DEBUG","INFO","WARN","ERROR","FATAL"};
|
||||
@ -56,7 +56,7 @@ class Logger {
|
||||
}
|
||||
#endif
|
||||
std::cerr << stream_.str() << std::endl;
|
||||
if (level_ == FATAL) {
|
||||
if (level_ == LL_FATAL) {
|
||||
abort();
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user