You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2021/12/20 04:50:09 UTC

[GitHub] [rocketmq-client-cpp] fengxiao2019 commented on issue #391: How to export the debug information of the consumer?

fengxiao2019 commented on issue #391:
URL: https://github.com/apache/rocketmq-client-cpp/issues/391#issuecomment-997593830


   here is the source code :
   
   ```
       def create_consumer(self):
           self.consumer = PushConsumerPro(self.consumer_group_id)
           self.consumer.set_log_level(ffi._CLogLevel.LEVEL_NUM)
   ```
   PushConsumerPro source code:
   
   ```
   class PushConsumerPro(PushConsumer):
       def set_log_level(self, log_level: ffi._CLogLevel) -> None:
           ans = ffi_check(ffi.dll.SetPushConsumerLogLevel(self._handle, log_level))
           print(f"set__log__level result: {ans}")
   ```
   PushConsumer's source code:
   the code come from **rocketmq-client-python**:
   ```
   class PushConsumer(object):
       def __init__(self, group_id, orderly=False, message_model=MessageModel.CLUSTERING):
           self._handle = dll.CreatePushConsumer(_to_bytes(group_id))
           if self._handle is None:
               raise NullPointerException('Returned null pointer when create PushConsumer')
           self._orderly = orderly
           self.set_message_model(message_model)
           self._callback_refs = []
   ```
   you mean I should call `set_log_level` before `self.set_message_model(message_model)` ?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org