view MoinMoin/signalling/log.py @ 1414:614005b5edb3

fixed some .format() unicode issues, partially fixing bug #124
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sat, 07 Jul 2012 20:22:21 +0200
parents 4ac437141bbe
children 384555088cab
line wrap: on
line source
# Copyright: 2010 MoinMoin:ThomasWaldmann
# License: GNU GPL v2 (or any later version), see LICENSE.txt for details.

"""
    MoinMoin - logging signal handlers
"""


from .signals import *

from MoinMoin import log
logging = log.getLogger(__name__)


@item_displayed.connect_via(ANY)
def log_item_displayed(app, item_name):
    wiki_name = app.cfg.interwikiname
    logging.info(u"item {0}:{1} displayed".format(wiki_name, item_name))

@item_modified.connect_via(ANY)
def log_item_modified(app, item_name):
    wiki_name = app.cfg.interwikiname
    logging.info(u"item {0}:{1} modified".format(wiki_name, item_name))