{"id":19076506,"url":"https://github.com/torfsen/ifttt-logging-handler","last_synced_at":"2026-05-20T15:30:20.103Z","repository":{"id":142303180,"uuid":"68503454","full_name":"torfsen/ifttt-logging-handler","owner":"torfsen","description":"A Python logging handler that forwards messages to IFTTT.com","archived":false,"fork":false,"pushed_at":"2016-09-18T07:14:51.000Z","size":8,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-02T18:25:10.745Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/torfsen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-09-18T07:08:08.000Z","updated_at":"2023-05-11T00:27:03.000Z","dependencies_parsed_at":null,"dependency_job_id":"90e4119a-cf2e-4daf-b70f-72e9f50db6b7","html_url":"https://github.com/torfsen/ifttt-logging-handler","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/torfsen%2Fifttt-logging-handler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/torfsen%2Fifttt-logging-handler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/torfsen%2Fifttt-logging-handler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/torfsen%2Fifttt-logging-handler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/torfsen","download_url":"https://codeload.github.com/torfsen/ifttt-logging-handler/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240128303,"owners_count":19752159,"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":"2024-11-09T01:59:41.761Z","updated_at":"2026-05-20T15:30:18.060Z","avatar_url":"https://github.com/torfsen.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# A logging handler that forwards log messages to IFTTT.com.\n\n[IFTTT.com][ifttt] is a platform that allows you to setup automatic reactions\nto a wide range of events. This Python module provides a logging handler that\nforwards log messages to IFTTT so that you can automatically react to them (for\nexample to get an e-mail if that cron job on some remote server you keep\nforgetting about logs an error).\n\n[ifttt]: https://ifttt.com\n\n\n## Installation\n\n    pip install -e git+https://github.com/torfsen/ifttt-logging-handler#egg=ifttt-logging-handler\n\n\n## Usage\n\nTo use the handler, first visit https://ifttt.com/maker to make sure that you\nhave activated the \"Maker\" channel in your IFTTT account. That page also\ndisplays your secret key which you will need later on to setup the logging\nhandler.\n\nOnce you've enabled the \"Maker\" channel, create a new IFTTT recipe using the\n\"Maker\" channel's \"Receive a web request\" trigger. You will need to choose an\nevent name for the trigger (for example ``my-log-event``). As with any other\nIFTTT recipe you can then select the action to be performed when the event is\ntriggered -- typically you want to be notified via email or SMS, but you're\nfree to choose any of the actions offered by IFTTT.\n\nUsing the handler from your Python code is easy:\n\n    import logging\n    from ifft_logging_handler import IFTTTLoggingHandler\n\n    # Setup\n    logger = logging.getLogger('my_logger')\n    handler = IFTTTLoggingHandler(key='your-secret-ifttt-key',\n                                  event='your-ifttt-event-name')\n    logger.addHandler(handler)\n\n    # Log things as usual\n    logger.error('Oh noes, foobarizing the flux capacitor failed!')\n\nRemember that you can set a level threshold on both the logger and the handler:\nonly log messages whose level is high enough will be forwarded to IFTTT.\n\n\n## Using data from the log message in your IFTTT action\n\nAn IFTTT \"Maker\" event can receive up to three custom string values. By\ndefault, these are the formatted log message, the location where the message\nwas logged (filename and line number), and, if available, the traceback\nembedded in the log message.\n\nThe values can then be used in your IFTTT action using the placeholders (called\n\"ingredients\" by IFTTT) `{{Value1}}`, `{{Value2}}`, and `{{Value3}}`.\n\nYou can customize which values are passed to IFTTT by passing a callback via\nthe `values` argument. The callback receives a `logging.LogRecord` instance and\ncan return up to 3 values:\n\n    def my_values(record):\n        return record.msg, some_important_value\n\n    handler = IFTTTLoggingHandler('my-key', 'my-event', values=my_values)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftorfsen%2Fifttt-logging-handler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftorfsen%2Fifttt-logging-handler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftorfsen%2Fifttt-logging-handler/lists"}