src/cm/main.py
author raph
Thu, 10 Dec 2009 15:07:25 +0100
changeset 42 82f6e2879e0a
parent 0 40c8f766c9b8
child 360 bfaab8740995
permissions -rw-r--r--
add tag filter to text share page

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()