0
로깅을 추가하려는 Python PGM이 있습니다. 로깅 중이지만 각 항목에 시간 소인을 추가하지는 않습니다. 나는 그것을 연구하고, 문서 등을 읽었으며, 정확하게 나에게 쓰여진 것처럼 보이지만, 그것은 나에게 타임 스탬프를주지 않는다. 여기서 잘못된 것은 무엇입니까?Python 3.4.2 로깅에 타임 스탬프가 표시되지 않습니다.
lfname = "TestAPIlog.log"
logging.basicConfig(filename=lfname, format='%(asctime)s %(message)s',
filemode='w', level=logging.WARNING)
logging.info('Started')
위의에 의해 생성 된 로그의 상단은 다음과 같습니다,
INFO:root:Started
INFO:requests.packages.urllib3.connectionpool:Starting new HTTPS connection (1): api.uber.com
DEBUG:requests.packages.urllib3.connectionpool:"GET /v1/estimates/price?end_latitude=39.762239&start_latitude=39.753385&server_token=MY_TOKEN_HERE&start_longitude=-104.998454&end_longitude=-105.013322 HTTP/1.1" 200 None
INFO:requests.packages.urllib3.connectionpool:Starting new HTTPS connection (1): api.uber.com
DEBUG:requests.packages.urllib3.connectionpool:"GET /v1/estimates/price?
감사
잘라
을
예 이전 코드에서 구성을 호출했습니다. –