How to print logging info in Python

1 Answer

0 votes
import logging

logging.basicConfig(format='%(asctime)s %(levelname)s:%(message)s', level=logging.INFO)

logging.info("python")




'''
run:

2023-02-26 10:22:34,633 INFO:python

'''

 



answered Feb 26, 2023 by avibootz

Related questions

1 answer 316 views
316 views asked Jun 25, 2018 by avibootz
1 answer 226 views
1 answer 287 views
1 answer 241 views
1 answer 262 views
262 views asked Apr 5, 2024 by avibootz
...