__author__ = 'Gareth Coles'

import logging
import sys

logging.basicConfig(
    format="%(asctime)s | %(levelname)8s | %(message)s",
    datefmt="%d %b %Y - %H:%M:%S",
    level=(logging.DEBUG if "--debug" in sys.argv else logging.INFO))


def log(message, level=logging.INFO):
    logging.log(level, message)


def log_request(request, message, level=logging.INFO):
    ip = request.remote_addr
    log("[{ip}] {message}".format(ip=ip, message=message), level)

@@ -164,20 +164,60 @@
 :%25S%22
-,%0A    l
+)%0A%0Alogger = logging.getLogger(%22Web%22)%0Alogger.setL
 evel
-=
 (log
@@ -270,17 +270,16 @@
 ng.INFO)
-)
 %0A%0A%0Adef l
@@ -319,19 +319,18 @@
     logg
-ing
+er
 .log(lev

Cut down on logging spam from dict2xml :U