Python에서 ImapClient 활동 로깅
Contents
[
Hide
]
활동 로깅 활성화
활동 로깅은 서버 연결, 전송 및 수신된 메시지 상세 정보, 이메일 처리 중 오류 메시지 및 클라이언트 또는 서버가 수행한 기타 모든 작업을 기록하는 것을 포함합니다. IMAP 클라이언트 활동 및 서버와의 상호 작용을 추적하려면, 다음 코드 샘플에서 ’log_file_name’ 속성을 사용하는 방법을 사용하십시오. ImapClient 지정된 로그 파일에 정보를 기록하는 클래스:
import aspose.email as ae
client = ae.clients.imap.ImapClient("imap.domain.com", 993, "user@domain.com", "pwd", ae.clients.SecurityOptions.SSL_IMPLICIT)
# Set the path to the log file using the LogFileName property.
client.log_file_name = "C:\\Aspose.Email.IMAP.log"
# Set the UseDateInLogFileName property if it is necessary.
client.use_date_in_log_file_name = False