separate tool name from logging()

Signed-off-by: Kouhei Maeda <mkouhei@palmtb.net>
add docstrings

Signed-off-by: Kouhei Maeda <mkouhei@palmtb.net>