クラス _Basic_class
¶
_Basic_class
はすべてのクラスのロガークラスで、特定のクラスのログを見たい場合は、デバッグ引数を追加するだけです。
例
# See PWM log
from robot_hat import PWM
# init the class with a debug argument
pwm = PWM(0, debug_level="debug")
# run some functions and see logs
pwm.freq(1000)
pwm.pulse_width_percent(100)
API
- class robot_hat.basic._Basic_class(debug_level='warning')¶
すべてのクラスの基本クラス
デバッグ機能付き
- DEBUG_LEVELS = {'critical': 50, 'debug': 10, 'error': 40, 'info': 20, 'warning': 30}¶
デバッグレベル
- DEBUG_NAMES = ['critical', 'error', 'warning', 'info', 'debug']¶
デバッグレベルの名称
- __init__(debug_level='warning')¶
基本クラスを初期化する
- パラメータ
debug_level (str/int) -- デバッグレベル、0(重大)、1(エラー)、2(警告)、3(情報)または4(デバッグ)
- property debug_level¶
デバッグレベル