Amazon Kinesis Firehose logging handler and utilities.
- Python2.7 or higher
- pip
pip install kflogs
import logging
import kflogs
logger = logging.getLogger('foo')
handler = kflogs.KinesisFirehoseHandler(stream_name='bar')
handler.setFormatter(kflogs.SimpleJsonFormatter())
logger.addHandler(handler)
logger.warning('Warnig!!')
{
"msecs": 146.5139389038086,
"args": [],
"name": "foo",
"thread": 140735094612736,
"created": 1492418072.146514,
"process": 52942, "threadName":
"MainThread", "module":
"test", "filename":
"test.py", "levelno": 30,
"processName": "MainProcess",
"pathname": "test.py",
"lineno": 11,
"exc_text": null,
"exc_info": null,
"funcName": "<module>",
"relativeCreated": 884.4590187072754,
"levelname": "WARNING",
"msg": "Warnig!!"
}
- Source hosted at GitHub
- Report issues/questions/feature requests on GitHub Issues
Pull requests are very welcome! Make sure your patches are well tested. Ideally create a topic branch for every separate change you make. For example:
- Fork the repo
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Added some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
Created and maintained by Masashi Terui (marcy9114@gmail.com)
MIT License (see LICENSE)