Skip to content

Commit

Permalink
Used debug level on logger
Browse files Browse the repository at this point in the history
  • Loading branch information
hvelarde committed Mar 10, 2017
1 parent c1993cf commit 00168f3
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions sc/social/like/subscribers.py
Expand Up @@ -38,10 +38,10 @@ def social_media_record_synchronizer(event):
if _FLAG:
return

logger.info(u'Processing: ' + repr(event.record))
logger.debug(u'Processing: ' + repr(event.record))
field = event.record.fieldName
if field not in FIELDS:
logger.info(u'No need to synchronize')
logger.debug(u'Field name not being tracked')
return

# find out which record we need to synchronize
Expand All @@ -54,8 +54,7 @@ def social_media_record_synchronizer(event):
# Plone record modified; synchronize sc.social.like record
record = ISocialLikeSettings.__identifier__ + '.' + field
else:
# unsupported interface name
logger.info(u'No need to synchronize')
logger.debug(u'Schema not being tracked')
return

registry = getUtility(IRegistry)
Expand All @@ -69,6 +68,5 @@ def social_media_record_synchronizer(event):
registry[record] = unicode(event.record.value)
_FLAG = False

msg = '{0} was synchronized; new value is "{1}"'
logger.info(
msg.format(repr(registry.records[record]), event.record.value))
logger.debug('{0} was synchronized; new value is "{1}"'.format(
repr(registry.records[record]), event.record.value))

0 comments on commit 00168f3

Please sign in to comment.