src/cm/main.py
author gibus
Tue, 11 Feb 2014 12:33:25 +0100
changeset 572 93383e54e042
parent 360 bfaab8740995
permissions -rw-r--r--
Font size for piwik optout iframe.

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