You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by sa...@apache.org on 2018/10/24 01:54:11 UTC
[pulsar] branch master updated: Python3 strings are not bytes
(#2827)
This is an automated email from the ASF dual-hosted git repository.
sanjeevrk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar.git
The following commit(s) were added to refs/heads/master by this push:
new 4a42a60 Python3 strings are not bytes (#2827)
4a42a60 is described below
commit 4a42a60a7f24439dbd7ba900dacddfd0be7ece1e
Author: Sanjeev Kulkarni <sa...@gmail.com>
AuthorDate: Tue Oct 23 18:54:06 2018 -0700
Python3 strings are not bytes (#2827)
---
pulsar-functions/instance/src/main/python/log.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pulsar-functions/instance/src/main/python/log.py b/pulsar-functions/instance/src/main/python/log.py
index c1a1420..ee596ce 100644
--- a/pulsar-functions/instance/src/main/python/log.py
+++ b/pulsar-functions/instance/src/main/python/log.py
@@ -50,7 +50,7 @@ class LogTopicHandler(logging.Handler):
def emit(self, record):
msg = self.format(record)
- self.producer.send_async(str(msg), None)
+ self.producer.send_async(str(msg).encode('utf-8'), None)
def configure(level=logging.INFO):
""" Configure logger which dumps log on terminal