From 86d8fc31300dc68ec1132dab1188ee0609e2a020 Mon Sep 17 00:00:00 2001 From: gwdwyy Date: Tue, 9 Jul 2013 17:48:12 +0800 Subject: [PATCH] add some log info --- Segment.cpp | 10 +++------- Trie.cpp | 4 +--- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/Segment.cpp b/Segment.cpp index ea0d5c7..8e6fff9 100644 --- a/Segment.cpp +++ b/Segment.cpp @@ -12,7 +12,9 @@ namespace CppJieba bool Segment::init(const char* const dictFilePath) { + LogInfo(string_format("_trie.init(%s) start...", dictFilePath)); _trie.init(dictFilePath); + LogInfo("_trie.init end."); } bool Segment::destroy() @@ -69,8 +71,7 @@ namespace CppJieba if(uniStr.empty()) { - sprintf(logBuf, "utf8ToUnicode [%s] failed!", utfStr.c_str()); - LogError(logBuf); + LogError(string_format("utf8ToUnicode [%s] failed!", utfStr.c_str())); return ""; } return uniStr; @@ -178,11 +179,6 @@ int main() vector res; string title = "我来到北京清华大学"; - /*segment.cutMM(title, res); - for(int i = 0; i < res.size(); i++) - { - cout<