Python-Selenium-Logger

#coding:utf-8

import logging
import time,os


logging.basicConfig(level=logging.DEBUG,
                    filename=os.path.dirname(os.path.abspath('.')) + '/log/'+ str(time.strftime("%Y%m%d-%H-%M-%S", time.localtime()) ) +'.log',
                    filemode='w',
                    format='%(asctime)s - %(pathname)s[line:%(lineno)d] - %(levelname)s: %(message)s'
                    )

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章