Skip to content

sockeye44/tornado_fluent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Async Fluentd client for Tornado 4-5

Install

pip3 install tornado_fluent

Usage

import tornado_fluent as ptf

ptf.send_message(host="your.server.local",
                 port=24224, tag="foo.bar", msg={"message": "foo", "abc": 123})
import tornado_fluent as ptf
msgs = [
        {"message": "foo", "abc": 123},
        {"message": "bar", "abc": 123},
        {"message": "baz", "abc": 123}
    ]

ptf.send_messages(host="your.server.local",
                 port=24224, tag="foo.bar", msgs=msgs)
import tornado_fluent as ptf

ptf.send_message_with_timestamp(host="your.server.local",
                 port=24224, tag="foo.bar", msg={"message": "foo", "abc": 123}, ts=1441588984)
import tornado_fluent as ptf
msgs = [
    [1441588984, {"message": "foo"}],
    [1441588985, {"message": "bar"}],
    [1441588986, {"message": "baz"}]
]

ptf.send_messages_with_timestamp(host="your.server.local",
                 port=24224, tag="foo.bar", msgs=msgs)