python-logstash
python-logstash copied to clipboard
Python logging handler for Logstash.
## About When I want to format logs I face error[Appendix A] telling that concatenate of str and bytes is impossible, but it works when I remove parameter: `formatter=text` in...
https://github.com/vklochan/python-logstash/issues/23
https://github.com/vklochan/python-logstash/issues/30
https://github.com/vklochan/python-logstash/issues/66
https://github.com/vklochan/python-logstash/issues/96
logstash/formatter.py: * On logstash 8.x (maybe earlier too), the ip of the sender will be the field "host":{"ip": sender_ip} ``` logstash | { logstash | "event" => { logstash |...
Using logstash 8.4.2, I get the following error from logstash when using a simple example with `version=1` formatter. ``` [2022-09-22T12:25:39,507][ERROR][logstash.codecs.json][main][3d55bea51246de48d1dcce7bf9f91a050ba59de18eabf4f05de2ead10f5d45ae] JSON parse error, original data now in message field {:message=>"Could...
I added "try... except..." to example1.py of this repo as following: ``` import logging import logstash import sys host = 'localhost' try: test_logger = logging.getLogger('python-logstash-logger') test_logger.setLevel(logging.INFO) # test_logger.addHandler(logstash.LogstashHandler(host, 5959, version=1))...
When using `json.dumps(message)`, if the `message` contains chinese, it will be displayed as unicode like "\u4f60\u597d", so it's better to add `ensure_ascii=False` to display chinese log content correctly.
Compatible with Chinese