src/cm/main.py
author rbernard
Fri, 12 Feb 2010 21:58:53 +0100
changeset 172 9a355903350d
parent 0 40c8f766c9b8
child 360 bfaab8740995
permissions -rw-r--r--
renaming variables

import logging
from django.db.models import signals

def logger_config():
    # create logger
    logger = logging.getLogger()
    ch = logging.StreamHandler()
    # create formatter
    formatter = logging.Formatter("%(asctime)s - %(levelname)s - %(name)s - %(module)s - %(funcName)s - %(message)s")
    # add formatter to ch
    ch.setFormatter(formatter)
    # add ch to logger
    logger.addHandler(ch)

logger_config()