0
내가 로깅에 대한 자습서를 따라 그리고 난 몇 가지 예제 코드가 작동 만들려고 노력하고 있어요 :로깅 코드가 작동하지 않는 이유는 무엇입니까?
log_this.addHandler(the_f)
어떤 생각 무슨 일이야 : 포함되지 않는 다음과 같은 경우에만 작동
log_this = logging.getLogger("Sample")
log_this.setLevel(logging.INFO)
the_f = logging.FileHandler("sample.log")
form = logging.Formatter("%(asctime)s (%name)s %(levelname)s %(message)s")
the_f.setFormatter(form)
log_this.addHandler(the_f)
log_this.warning("hi")
을 ?
는 (은'log_this.addHandler를 넣을 때 파일에 기록된다 the_f)'라인? – eguaio