{"id":19595272,"url":"https://github.com/rafaellaurindo/laravel-telegram-logging","last_synced_at":"2025-04-05T10:09:34.292Z","repository":{"id":35142872,"uuid":"212364853","full_name":"rafaellaurindo/laravel-telegram-logging","owner":"rafaellaurindo","description":"Send Laravel logs to a Telegram chat via Telegram Bot.","archived":false,"fork":false,"pushed_at":"2024-12-09T23:18:06.000Z","size":250,"stargazers_count":34,"open_issues_count":9,"forks_count":17,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-29T09:12:15.839Z","etag":null,"topics":["laravel","laravel-package","monolog","monolog-handler","telegram","telegram-bot","telegram-bot-api"],"latest_commit_sha":null,"homepage":null,"language":"PHP","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/rafaellaurindo.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},"funding":{"custom":["https://www.paypal.me/rafaellaurindo","https://ko-fi.com/rafaellaurindo","https://www.buymeacoffee.com/rafaellaurindo"]}},"created_at":"2019-10-02T14:38:36.000Z","updated_at":"2024-09-07T00:19:42.000Z","dependencies_parsed_at":"2025-01-05T09:10:26.463Z","dependency_job_id":"02094e30-4b8c-4f78-82a9-646c058ad8ec","html_url":"https://github.com/rafaellaurindo/laravel-telegram-logging","commit_stats":{"total_commits":33,"total_committers":5,"mean_commits":6.6,"dds":"0.33333333333333337","last_synced_commit":"50f1f91db194c9bae95702ccd64fe059448e65a8"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rafaellaurindo%2Flaravel-telegram-logging","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rafaellaurindo%2Flaravel-telegram-logging/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rafaellaurindo%2Flaravel-telegram-logging/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rafaellaurindo%2Flaravel-telegram-logging/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rafaellaurindo","download_url":"https://codeload.github.com/rafaellaurindo/laravel-telegram-logging/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247318745,"owners_count":20919484,"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":["laravel","laravel-package","monolog","monolog-handler","telegram","telegram-bot","telegram-bot-api"],"created_at":"2024-11-11T08:46:22.133Z","updated_at":"2025-04-05T10:09:34.269Z","avatar_url":"https://github.com/rafaellaurindo.png","language":"PHP","funding_links":["https://www.paypal.me/rafaellaurindo","https://ko-fi.com/rafaellaurindo","https://www.buymeacoffee.com/rafaellaurindo","https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick\u0026hosted_button_id=LUAC5W7GF2BVW\u0026source=url"],"categories":[],"sub_categories":[],"readme":"# Laravel Telegram Logging\n\nSend Laravel logs to a Telegram chat via Telegram Bot.\n\n[![Total Downloads](https://poser.pugx.org/rafaellaurindo/laravel-telegram-logging/downloads)](//packagist.org/packages/rafaellaurindo/laravel-telegram-logging)\n[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick\u0026hosted_button_id=LUAC5W7GF2BVW\u0026source=url)\n[![license](https://img.shields.io/github/license/rafaellaurindo/laravel-telegram-logging.svg)](https://github.com/rafaellaurindo/laravel-telegram-logging/blob/master/LICENSE)\n\n## Installation\n\nTo install the package you can use [Composer](https://getcomposer.org/).\n\n```bash\ncomposer require rafaellaurindo/laravel-telegram-logging\n```\n\nPublish the package configuration file using the following artisan command:\n\n```bash\nphp artisan vendor:publish --provider \"RLaurindo\\TelegramLogger\\TelegramLoggerServiceProvider\"\n```\n\nTo send messages to your Telegram Chat, you first need a Telegram Bot. If you don't have one, see in this [Telegram Instructions](TELEGRAM_BOT_INSTRUCTIONS.md) how to create one.\n\nSet your Bot Token and chat_id (user, channel or group that will receive log messages) and set as environment variable.\n\nAdd in your **.env**, the follows variables:\n\n```bash\nTELEGRAM_BOT_TOKEN=bot_token\nTELEGRAM_CHAT_ID=chat_id\n```\n\n## Usage\n\nAdd the new Log Channel in **config/logging.php**:\n\n```php\n'telegram' =\u003e [\n    'driver' =\u003e 'custom',\n    'via'    =\u003e RLaurindo\\TelegramLogger\\TelegramLogger::class,\n    'level'  =\u003e 'debug',\n]\n```\n\nIf you use the **stack channel** as default logger, you can just the telegram channel to your stack:\n\n```php\n'stack' =\u003e [\n    'driver' =\u003e 'stack',\n    'channels' =\u003e ['single', 'telegram'],\n]\n```\n\nOr you can simply change the default logging channel in the .env file.\n\n```bash\nLOG_CHANNEL=telegram\n```\n\nGreat! Your Laravel project can now send logs to your Telegram chat.\n\nYou can use **Laravel Log Facade** to send logs to your chat:\n\n```php\n// Use the Laravel Log Facade\nuse Illuminate\\Support\\Facades\\Log;\n...\n\n// All Laravel log leves are avaiable\nLog::channel('telegram')-\u003eemergency($message);\nLog::channel('telegram')-\u003ealert($message);\nLog::channel('telegram')-\u003ecritical($message);\nLog::channel('telegram')-\u003eerror($message);\nLog::channel('telegram')-\u003ewarning($message);\nLog::channel('telegram')-\u003enotice($message);\nLog::channel('telegram')-\u003einfo($message);\nLog::channel('telegram')-\u003edebug($message);\n```\n\n## Telegram Instructions\n\nTo use this package, you need to create a Telegram bot to send messages to your chat.\n\nIf you need help, check out these [Telegram Instructions](TELEGRAM_BOT_INSTRUCTIONS.md) that I created for you.\n\n## Contributing\n\nPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.\n\nPlease make sure to update tests as appropriate.\n\n## Donations are welcome\n\nIf this project help you reduce time to develop, you can give me a cup of coffee :)\n\nDonate with Paypal:\n\n[![paypal](https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick\u0026hosted_button_id=LUAC5W7GF2BVW\u0026source=url)\n\n## License\n\n[MIT](https://github.com/rafaellaurindo/laravel-telegram-logging/blob/master/LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frafaellaurindo%2Flaravel-telegram-logging","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frafaellaurindo%2Flaravel-telegram-logging","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frafaellaurindo%2Flaravel-telegram-logging/lists"}