로깅
로깅
로그는 temp 디렉터리에 저장되며, 기본 로깅 수준 INFO로 콘솔에도 출력됩니다. temp 디렉터리 또는 로그 파일의 파일 경로는 다음과 같이 확인할 수 있습니다:
import glasswall
print(glasswall._TEMPDIR)
print(glasswall.config.logging.log_file_path)
>>> C:\Users\<UserName>\AppData\Local\Temp\glasswall
>>> C:\Users\<UserName>\AppData\Local\Temp\glasswall\logs\2021-03-15 122826.txt
로깅 수준은 수정할 수 있습니다. 로깅 수준 목록은 https://docs.python.org/3/library/logging.html#logging-levels에서 확인하세요.
import logging
import glasswall
# Modify logging level for logs to the console
glasswall.config.logging.console.setLevel(logging.DEBUG)
# Modify logging level for logs to file
glasswall.config.logging.log.setLevel(logging.DEBUG)