mirror of
https://github.com/fxsjy/jieba.git
synced 2025-07-10 00:01:33 +08:00
add an API to control log level: jieba.setLogLevel
This commit is contained in:
parent
2ef9dd3a70
commit
759e1029c8
@ -23,7 +23,16 @@ min_freq = 0.0
|
||||
total =0.0
|
||||
user_word_tag_tab={}
|
||||
initialized = False
|
||||
|
||||
|
||||
log_console = logging.StreamHandler(sys.stderr)
|
||||
logger = logging.getLogger(__name__)
|
||||
logger.setLevel(logging.DEBUG)
|
||||
logger.addHandler(log_console)
|
||||
|
||||
def setLogLevel(log_level):
|
||||
global logger
|
||||
logger.setLevel(log_level)
|
||||
|
||||
def gen_trie(f_name):
|
||||
lfreq = {}
|
||||
|
Loading…
x
Reference in New Issue
Block a user