Python library for sending log events to flume. Support both FlumeNG and FlumeOG (legacyThrift)
- pip install flumelogger
>>> import logging
>>> from flumelogger import handler
>>> fh = handler.FlumeHandler(host='my-flume-agent.example.com', port=9090, type='og',
... headers={'application': 'Skyline.Analyzer'})
>>> logger = logging.getLogger("AnalyzerLog")
>>> logger.setLevel(logging.DEBUG)
>>> logger.addHandler(fh)
>>> logger.info("python is cool")
>>>
>>> host = 'agent1.example.com,agent2.example.com'
>>> [...]
>>> [...]
>>> fh.reconnect()