Logging

Für des Entwickelns stellt Plone einen eigenen Logger bereit: plone_log:

from logging import getLogger
log = getLogger('Plone')
log.info('Debug: %s \n%s', summary, text)

Wie plone_log verwendet werden kann, finden Sie z.B. in setConstrainTypes.cpy:

…
plone_log=context.plone_log
constrainTypesMode = context.REQUEST.get('constrainTypesMode', [])
currentPrefer = context.REQUEST.get('currentPrefer', [])
currentAllow = context.REQUEST.get('currentAllow', [])
plone_log( "SET: currentAllow=%s, currentPrefer=%s" % ( currentAllow, currentPrefer ) )
…