This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import logging | |
from logging.handlers import TimedRotatingFileHandler | |
import os | |
log_handler = logging.getLogger(__name__) | |
log_handler.setLevel(logging.INFO) | |
formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s') | |
timed_handler = TimedRotatingFileHandler('jira.log', when='S', interval=1,backupCount=0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def send_email(): | |
contacts = ['ryan_aquino@trendmicro.com'] | |
msg = EmailMessage() | |
msg['Subject'] = 'Test subject' | |
msg['From'] = 'dcs_coc24x7@trendmicro.com' | |
msg['To'] = contacts | |
msg['Cc'] = contacts |