You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/06/22 18:58:06 UTC

[GitHub] [pulsar] lbenc135 commented on a change in pull request #10981: [python-client] Fixed crash when using Python logger

lbenc135 commented on a change in pull request #10981:
URL: https://github.com/apache/pulsar/pull/10981#discussion_r656499782



##########
File path: pulsar-client-cpp/python/src/config.cc
##########
@@ -110,21 +112,29 @@ class LoggerWrapper: public Logger {
 
    public:
 
-    LoggerWrapper(const std::string &logger, PyObject* pyLogger) {
+    LoggerWrapper(const std::string &filename, PyObject* pyLogger) {
         _pyLogger = pyLogger;
         Py_XINCREF(_pyLogger);
 
+        fallbackLogger = (new ConsoleLoggerFactory())->getLogger(filename);

Review comment:
       Thanks @BewareMyPower for the detailed explanation, C++ is not my first language (nor second) so I appreciate it. Can you take a look again? I think I fixed it, although I'm not sure which singleton you were referring to.




-- 
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:
users@infra.apache.org