{
"info": {
"author": "Nash Yeung",
"author_email": "nashyeung@gmail.com",
"bugtrack_url": null,
"classifiers": [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 3"
],
"description": "# A Python structured logger for Fluentd\n\n\nMany web/mobile applications generate huge amount of event logs (c,f. login, logout, purchase, follow, etc). To analyze these event logs could be really valuable for improving the service. However, the challenge is collecting these logs easily and reliably.\n\n[Fluentd](http://github.com/fluent/fluentd) solves that problem by having: easy installation, small footprint, plugins, reliable buffering, log forwarding, etc.\n\n**fluent-logger-python** is a Python library, to record the events from Python application.\n\n## Requirements\n\n* Python 2.6 or greater including 3.x\n\n## Installation\n\nThis library is distributed as 'fluent-logger' python package. Please execute the following command to install it.\n\n $ pip install fluent-logger\n\n## Configuration\n\nFluentd daemon must be lauched with the following configuration:\n\n \n type tcp\n port 24224\n \n\n \n type stdout\n \n\n## Usage\n\n### Event-Based Interface\n\nFirst, you need to call logger.setup() to create global logger instance. This call needs to be called only once, at the beggining of the application for example.\n\nBy default, the logger assumes fluentd daemon is launched locally. You can also specify remote logger by passing the options.\n\n from fluent import sender\n \n # for local fluent\n sender.setup('app')\n \n # for remote fluent\n sender.setup('app', host='host', port=24224)\n\nThen, please create the events like this. This will send the event to fluent, with tag 'app.follow' and the attributes 'from' and 'to'.\n\n from fluent import event\n\n # send event to fluentd, with 'app.follow' tag\n event.Event('follow', {\n 'from': 'userA',\n 'to': 'userB'\n })\n\n### Python logging.Handler interface\n\nThis client-library also has FluentHanler class for Python logging module.\n\n import logging\n from fluent import handler\n \n logging.basicConfig(level=logging.INFO)\n l = logging.getLogger('fluent.test')\n l.addHandler(handler.FluentHandler('app.follow', host='host', port=24224))\n l.info({\n 'from': 'userA',\n 'to': 'userB'\n })\n \n### Pyramid logging configuration\n\nFirst, setup a fluent log formatter.\nNote the different format of \"format\".\n\n [formatter_fluent]\n class = fluent.handler.FluentRecordFormatter\n format =\n levelname\n name\n #datefmt = %H:%M:%S (fluentd native date format is used instead)\n\nThen, setup a fluent handler.\n\n class = fluent.handler.FluentHandler\n args = (\"\",)\n level = INFO\n formatter = fluent\n\nFinally, add the fluent handler to handler list.\n\n [handlers]\n keys = generic, fluent\n\n## Contributors\n\nPatches contributed by [those people](https://github.com/fluent/fluent-logger-python/contributors).\n\n## License\n\nApache License, Version 2.0",
"description_content_type": null,
"docs_url": null,
"download_url": "http://pypi.python.org/pypi/fluent-logger-pyramid/",
"downloads": {
"last_day": -1,
"last_month": -1,
"last_week": -1
},
"home_page": "https://github.com/nashyeung/fluent-logger-pyramid",
"keywords": null,
"license": "Apache License, Version 2.0",
"maintainer": null,
"maintainer_email": null,
"name": "fluent-logger-pyramid",
"package_url": "https://pypi.org/project/fluent-logger-pyramid/",
"platform": "UNKNOWN",
"project_url": "https://pypi.org/project/fluent-logger-pyramid/",
"project_urls": {
"Download": "http://pypi.python.org/pypi/fluent-logger-pyramid/",
"Homepage": "https://github.com/nashyeung/fluent-logger-pyramid"
},
"release_url": "https://pypi.org/project/fluent-logger-pyramid/0.0.3/",
"requires_dist": null,
"requires_python": null,
"summary": "A Python logging handler for Fluentd, with better Pyramid integration",
"version": "0.0.3"
},
"last_serial": 1053510,
"releases": {
"0.0.1": [
{
"comment_text": "",
"digests": {
"md5": "4b0c663ba8356a99a6b05578a5849f31",
"sha256": "455e7d738917ecb87edef4c43660947948d665a98e51027527dbefbcbc862b1d"
},
"downloads": -1,
"filename": "fluent-logger-pyramid-0.0.1.tar.gz",
"has_sig": false,
"md5_digest": "4b0c663ba8356a99a6b05578a5849f31",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 4810,
"upload_time": "2014-04-07T08:05:27",
"url": "https://files.pythonhosted.org/packages/64/b4/7e33414c48234a1371efcc640fe4791ba87c15fe09c42d65073d937cbf68/fluent-logger-pyramid-0.0.1.tar.gz"
}
],
"0.0.2": [
{
"comment_text": "",
"digests": {
"md5": "2f8b287451d7976637b9cb52caca4d4e",
"sha256": "deb45248e76ad088bc5e89502b28f460af876837bb463c343365514401a50ee5"
},
"downloads": -1,
"filename": "fluent-logger-pyramid-0.0.2.tar.gz",
"has_sig": false,
"md5_digest": "2f8b287451d7976637b9cb52caca4d4e",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 4754,
"upload_time": "2014-04-07T09:47:07",
"url": "https://files.pythonhosted.org/packages/e6/98/74ab85317f2132a8e13516161e765b10e3b9ea56e693545c57eb00eca16d/fluent-logger-pyramid-0.0.2.tar.gz"
}
],
"0.0.3": [
{
"comment_text": "",
"digests": {
"md5": "d47d684f3c6f738ff06cc6eb4285acbb",
"sha256": "813416b512996f83213f443ec200a4576c95d5c904c3ec442cd2c468f881a6e2"
},
"downloads": -1,
"filename": "fluent-logger-pyramid-0.0.3.tar.gz",
"has_sig": false,
"md5_digest": "d47d684f3c6f738ff06cc6eb4285acbb",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 4739,
"upload_time": "2014-04-07T09:51:53",
"url": "https://files.pythonhosted.org/packages/03/d8/231c747c08c378a49c9b6befafdf00ed54b3abca30fa03172277d66fbb65/fluent-logger-pyramid-0.0.3.tar.gz"
}
]
},
"urls": [
{
"comment_text": "",
"digests": {
"md5": "d47d684f3c6f738ff06cc6eb4285acbb",
"sha256": "813416b512996f83213f443ec200a4576c95d5c904c3ec442cd2c468f881a6e2"
},
"downloads": -1,
"filename": "fluent-logger-pyramid-0.0.3.tar.gz",
"has_sig": false,
"md5_digest": "d47d684f3c6f738ff06cc6eb4285acbb",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 4739,
"upload_time": "2014-04-07T09:51:53",
"url": "https://files.pythonhosted.org/packages/03/d8/231c747c08c378a49c9b6befafdf00ed54b3abca30fa03172277d66fbb65/fluent-logger-pyramid-0.0.3.tar.gz"
}
]
}