BewareMyPower opened a new pull request #10712: URL: https://github.com/apache/pulsar/pull/10712
### Motivation Some users are confused about how to customize the logger in C++ client, while they don't want to build their own cpp library with log4cxx support and change the log4cxx.conf file. ### Modifications - Provide an example program that writes logs to a single file. - Change other examples' topic name to v2 format instead of the old v1 topic format. ### Verifying this change - [ ] Make sure that the change passes the CI checks. This change is a trivial rework / code cleanup without any test coverage. If you ran the `SampleFileLogger` program in your local env without any pulsar server, a `pulsar-client-cpp.log` would be created and it contains the content like following. ``` Wed May 26 15:34:03 2021 INFO [0x10fde8e00] ConnectionPool:84 Created connection for pulsar://localhost:6650 Wed May 26 15:34:03 2021 ERROR [0x700002a2c000] ClientConnection:422 [<none> -> pulsar://localhost:6650] Failed to establish connection: Connection refused Wed May 26 15:34:03 2021 INFO [0x700002a2c000] ClientConnection:1446 [<none> -> pulsar://localhost:6650] Connection closed Wed May 26 15:34:03 2021 ERROR [0x700002a2c000] ClientImpl:181 Error Checking/Getting Partition Metadata while creating producer on persistent://public/default/my-topic -- ConnectError Wed May 26 15:34:03 2021 INFO [0x700002a2c000] ClientConnection:261 [<none> -> pulsar://localhost:6650] Destroyed connection Wed May 26 15:34:03 2021 INFO [0x10fde8e00] ClientImpl:483 Closing Pulsar client ``` -- 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. For queries about this service, please contact Infrastructure at: [email protected]
