<commit_before>"""
<Program Name>
  log_and_notify.py
  
<Started>
  June 27th, 2009
  
<Author>
  <NAME>
  <EMAIL>
 
<Purpose>
  The purpose of this file is to log msgs that any program wants to log, notify admins if 
  anything is down and the admins need to be notified. The admins may also be emailed the
  the traceback of the program.

<Usage>
  This is more like a library for the integration tests, usually this file is imported
  in order to use its functionalities
"""

import send_gmail
import traceback
import time
import socket
import sys

# the people to notify on failure/if anything goes wrong
notify_list = ["<EMAIL>", "<EMAIL>"]


def log(msg):
  """
  <Purpose>
    Prints a particularly formatted log msg to stdout

  <Arguments>
    msg, the text to print out

  <Exceptions>
    None.

  <Side Effects>
    Prints a line to stdout.

  <Returns>
    None.
  """
  print time.ctime() + " : " + msg
  return  
  
  
  
def notify(text, subject):
  """
  <Purpose>
    Send email with message body text to the members of the notify_list

  <Arguments>
    text, the text of the email message body to be generated<commit_msg>Updates the list of people who are contacted when the integration tests fail.  * Monzur, Leonard, Justin, Herman, and Albert  * Fixes #1283.<commit_after>"""
<Program Name>
  log_and_notify.py
  
<Started>
  June 27th, 2009
  
<Author>
  <NAME>
  <EMAIL>
 
<Purpose>
  The purpose of this file is to log msgs that any program wants to log, notify admins if 
  anything is down and the admins need to be notified. The admins may also be emailed the
  the traceback of the program.

<Usage>
  This is more like a library for the integration tests, usually this file is imported
  in order to use its functionalities
"""

import send_gmail
import traceback
import time
import socket
import sys

# the people to notify on failure/if anything goes wrong
notify_list = [
  "<EMAIL>",
  "<EMAIL>",
  "<EMAIL>",
  "<EMAIL>",
  "<EMAIL>",
]


def log(msg):
  """
  <Purpose>
    Prints a particularly formatted log msg to stdout

  <Arguments>
    msg, the text to print out

  <Exceptions>
    None.

  <Side Effects>
    Prints a line to stdout.

  <Returns>
    None.
  """
  print time.ctime() + " : " + msg
  return  
  
  
  
def notify(text, subject):
  """
  <Purpose>
    Send email with message body text to the members of the notify_list

  <Arguments>
    text, the text of the email message body to be generated
{'fraction_non_alphanumeric': 0.08017908017908018, 'fraction_numerical': 0.006512006512006512, 'mean_word_length': 3.152027027027027, 'pattern_counts': {'":': 0, '<': 38, '<?xml version=': 0, '>': 38, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '244178', 'n_tokens_mistral': 808, 'n_tokens_neox': 767, 'n_words': 336}