question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

logstash_udp_handler doesn't work in py3

See original GitHub issue
--- Logging error ---
Traceback (most recent call last):
  File "/usr/lib/python3.6/logging/handlers.py", line 634, in emit
    self.send(s)
  File "/usr/lib/python3.6/logging/handlers.py", line 692, in send
    self.sock.sendto(s, self.address)
TypeError: a bytes-like object is required, not 'str'

Needs e.g. a conversion to six.binary_type here: https://github.com/saltstack/salt/blob/v2018.3.3/salt/log/handlers/logstash_mod.py#L381

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:14 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
kiemliczcommented, May 6, 2019

Sure, will do but not at the moment
Meanwhile you can find it here: https://github.com/kiemlicz/ambassador/blob/master/salt/base/_log_handlers/logstash_mod.py Putting logstash_mod.py under _log_handlers will override the ‘stock’ one

0reactions
OrangeDogcommented, Jun 1, 2020

Not sure when this got released, but it’s fixed in 3000.3

Read more comments on GitHub >

github_iconTop Results From Across the Web

python-logstash-async/about.rst at master
Python logging handler for sending log events asynchronously to Logstash. ... the Logstash server has been successful; Transport of events via TCP, UDP...
Read more >
elasticsearch - python-logstash not working
I have an elasticsearch cluster (ELK) and some nodes sending logs to the logstash using filebeat. Lately I added a new application server, ......
Read more >
Logstash udp input listen on port 5044 but doesn't receive ...
I have tried with this command tcpdump -vvv -A -i any port 5044 It receive the syslog messages 12:41:34.438831 IP (tos 0x0, ttl...
Read more >
python3-logstash
`LogstashHandler` is a custom logging handler which sends Logstash messages using UDP, or TCP. #### For example: ``` import logging import logstash import...
Read more >
Clustering 4000 Stack Overflow tags with BigQuery k-means
Now get ready for some SQL magic. BigQuery ML does a good job of hot-encoding strings, but it doesn't handle arrays as I...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found