{"id":27627205,"url":"https://github.com/treasure-data/td-logger-python","last_synced_at":"2025-04-23T13:53:31.372Z","repository":{"id":39963443,"uuid":"2409594","full_name":"treasure-data/td-logger-python","owner":"treasure-data","description":"Python logging module for td-agent","archived":false,"fork":false,"pushed_at":"2023-07-31T17:13:32.000Z","size":28,"stargazers_count":4,"open_issues_count":2,"forks_count":5,"subscribers_count":80,"default_branch":"master","last_synced_at":"2025-03-25T16:50:54.904Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://treasure-data.com/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/treasure-data.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-09-18T13:35:11.000Z","updated_at":"2022-08-24T01:29:44.000Z","dependencies_parsed_at":"2022-09-26T17:40:53.288Z","dependency_job_id":null,"html_url":"https://github.com/treasure-data/td-logger-python","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/treasure-data%2Ftd-logger-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/treasure-data%2Ftd-logger-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/treasure-data%2Ftd-logger-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/treasure-data%2Ftd-logger-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/treasure-data","download_url":"https://codeload.github.com/treasure-data/td-logger-python/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250444199,"owners_count":21431601,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-04-23T13:53:30.767Z","updated_at":"2025-04-23T13:53:31.360Z","avatar_url":"https://github.com/treasure-data.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"td-logger: logging library for Treasure Data Cloud\n=================================================\n\nSetup\n-----\n\nBefore using this logging handler, td-agent must be properly configured at the\nlocalhost. Please confirm these settings are in your\n/etc/td-agent/td-agent.conf.\n\n    ## built-in TCP input\n    \u003csource\u003e\n      type tcp\n    \u003c/source\u003e\n\n    # Treasure Data output\n    # match events whose tag is td.DATABASE.TABLE\n    \u003cmatch td.*.*\u003e\n      type tdlog\n      apikey YOUR_API_KEY\n    \u003c/match\u003e\n\nFor more information, please look at the documentation.\n\n* http://docs.treasure-data.com/\n\nInstall\n-------\n\n    $ easy_install td-logger\n\nor\n\n    $ pip install td-logger\n\nUsage\n-----\n\nCheck out the tests folder for more samples.\n\n    import logging\n    from tdlog import logger\n\n    logging.basicConfig(level=logging.INFO)\n    l = logging.getLogger('td_logger.test')\n    l.addHandler(logger.TreasureDataHandler())\n\n    l.info('Some message')\n    js = { \"semicolon\" : \";\", \"at\" : \"@\" }\n    l.info(js)\n\nThis will throw the log entries to the local td-agent. And there's an important\npoint. This logger accepts only 'dict' and 'json string'.\n\nAlso, these parameters are logged by default.\n\n* sys_host\n* sys_name\n* sys_module\n* sys_lineno\n* sys_levelno\n* sys_levelname\n* sys_filename\n* sys_funcname\n* sys_exc_info\n* msg\n\nThese parameters can be specified at TreasureDataHander constructor.\n\n* host: td-agent host (default: 127.0.0.1)\n* port: td-agent port (default: 24224)\n* db: td database name (default: log)\n* table: td table name (default: default)\n* bufmax: buffer size max when td-agent is unavailable (default: 1*1024*1024)\n* timeout: network timeout (default: 3.0)\n\nHave fun!\n\nHow to Develop\n--------------\n\nFolloings are the way to setup development envionment on MacOSX.\n\n    $ sudo easy_install virtualenv\n    $ virtualenv --no-site-packages .\n    New python executable in ./bin/python\n    Installing setuptools............done.\n    Installing pip...............done.\n    $ source bin/activate\n    $ bin/pip install msgpack-python\n\nRuning tests\n\n    $ python setup.py test\n\nSpecial Thanks\n--------------\n\n- [Joshua Kuntz](https://github.com/j3kuntz) for the original work\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftreasure-data%2Ftd-logger-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftreasure-data%2Ftd-logger-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftreasure-data%2Ftd-logger-python/lists"}