LoginSignup
2
0

More than 3 years have passed since last update.

loggingの小数点を,から.に変える

Last updated at Posted at 2020-11-09

検索の上位に出てくる
Python logging_ use milliseconds in time format - Stack Overflow
がちょっと求めているものと違う+何度か忘れているのでメモする。

import logging
logging.basicConfig(
    level=logging.INFO,
    format="%(asctime)s.%(msecs)03d  %(message)s",
    datefmt="%H:%M:%S"
)

datefmtで秒まで表示するようにして、formatで%(msecs)03dをつける。

2
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
2
0