LoginSignup
1
0

More than 3 years have passed since last update.

AllenNLPにあるloggingを消す方法

Last updated at Posted at 2020-01-11

AllenNLPを組み込んでプログラム開発を行うとAllenNLP内のモジュールにあるlogも表示されてウザいというときの解決方法.

目的:

AllenNLPモジュール内のlog levelだけを引き上げたい

僕の場合

AllenNLPモジュール ー> WARNING level
それ以外 ー> INFO level

解決方法

そんなときは以下の行をmain.pyに追記してやるとAllenNLPモジュール内のlog levelだけをwarningレベルまで引き上げることができる.
logging.getLogger('allennlp').setLevel(logging.WARNING)

参考文献

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0