Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Python log handler for sending log events to flume
Python
branch: master

Merge pull request #4 from mlua/master

Keep flume connection
latest commit 67bf9a5fc4
@lsjostro authored
Failed to load latest commit information.
flumelogger dont connect every time
README.md copy headers dict for OG type
setup.py bump version
test.py some thrift error handling

README.md

flumelogger

Python library for sending log events to flume. Support both FlumeNG and FlumeOG (legacyThrift)

Installation

  • pip install flumelogger

Usage

>>> 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")
>>>
Something went wrong with that request. Please try again.