w1_logging - steelbear/HMG_Softeer_DE GitHub Wiki
logging
- ํ์ด์ฌ์์ ๋กํฌ ๊ธฐ๋ฅ์ ๊ด๋ฆฌํ๋ ๋ด์ฅ ๋ผ์ด๋ธ๋ฌ๋ฆฌ
- ๋ก๊ทธ ํ์ผ ์ง์
- ๋ก๊ทธ ์ ์ฑ
์ง์
- ๋ก๊ทธ ํ์ ์ง์
- ์ง๊ด์ ์ธ ๋ก๊น
ํจ์
import logging
logging.basicConfig(
filename='elt_project_log.txt', # ๋ก๊ทธ ํ์ผ
format='%(asctime)s, %(message)s', # ๋ก๊ทธ ํ์
datefmt='%Y-%b-%d-%H-%M-%S', # ํ์์คํ
ํ ํ์
level=logging.INFO) # ๋ก๊ทธ๋ฅผ ์ ์ฅํ ๋จ๊ณ
logging.debug('log debug')
logging.info('log info')
logging.error('log error')