code: def log_decl_method(func):
      
      from functools import wraps
  
      @wraps(func)
      def with_logging(*args, **kwargs):
          self = args[0]
          decl = args[2]
          log(DEBUG, u"    {}: {} {}".format(
              self.state['current_step'], decl.name,
              serialize(decl.value).strip()).encode('utf-8'))
          return func(*args, **kwargs)
      return with_logging
docs: Decorate do_declartion methods for debug logging.