{"id":20388588,"url":"https://github.com/efureev/loogger-driver-php","last_synced_at":"2025-06-11T15:37:04.814Z","repository":{"id":62550917,"uuid":"504419400","full_name":"efureev/loogger-driver-php","owner":"efureev","description":"Loogger driver php","archived":false,"fork":false,"pushed_at":"2022-06-17T08:39:35.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-15T09:02:45.009Z","etag":null,"topics":[],"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/efureev.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}},"created_at":"2022-06-17T06:28:51.000Z","updated_at":"2022-06-17T08:07:52.000Z","dependencies_parsed_at":"2022-11-03T02:00:49.994Z","dependency_job_id":null,"html_url":"https://github.com/efureev/loogger-driver-php","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/efureev%2Floogger-driver-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/efureev%2Floogger-driver-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/efureev%2Floogger-driver-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/efureev%2Floogger-driver-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/efureev","download_url":"https://codeload.github.com/efureev/loogger-driver-php/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241940541,"owners_count":20045878,"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-15T03:11:43.731Z","updated_at":"2025-03-04T23:42:48.040Z","avatar_url":"https://github.com/efureev.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Loogger Notification Driver\n\n## Description\n\nPHP driver for `Loogger` service to send notifications to `Telegram`.\n\n## Install\n\n```bash\ncomposer require efureev/loogger \"^1.0\"\n```\n\n## Use\n\n### In your code:\n\n```php\n$looggerConfig = new Config($looggerConfigJson);\n$loogger = new Loogger($looggerConfig);\n\n$loogger-\u003esend($msg);\n// ...\n$loogger\n    -\u003epattern(\"\u003cb\u003eGitlab\u003c/b\u003e: {{MSG}}\")\n    -\u003esendHTML(\"\u003ci\u003eHello from service\u003c/i\u003e\");\n```\n\nA Message type format:\n\n```php\n$loogger\n-\u003easPlain() // send message as plain\n// -\u003esend('Text')\n-\u003easHTML() // send message as HTML\n// -\u003esend('\u003cb\u003eBold\u003c/b\u003e \u003cpre\u003ecode\u003c/pre\u003e')\n-\u003easMD() // send message as Markdown.\n// -\u003esend('*Bold* text')\n```\n\nAllowed variables for patterns and message:\n\n- `MSG` - The Message content\n- `SERVICE_NAME` - The service name\n- `SERVICE_DESCRIPTION` - The service description\n- `NOW` - The datetime. Format: `RFC822`\n- `CHAT_ID` - The TG-chat ID\n- `BR` - Return a cursor to the next line. Like a `\\n`.\n- `TAB` - Return a cursor to the next line. Like a `\\t`.\n\n### from console-file:\n\n```shell\nphp send2loogger.php --msg='Testing message!'\n```\n\n**Arguments:**\n\n* `--cnf=\u003cpath\u003e` - A full path to config file. Config file should be a JSON typed.\n* `--msg='\u003ctext\u003e'` - A sending message\n* `--debug` - Enables `debug mode`\n\n### from curl:\n\n```shell\ncurl --location --request POST 'https://loogger.mockery.dev/push' \\\n--header 'X-Token: $2a$10$du8TEzvOs6HTgrbkuuTl0JNnhGF2Ki3xLKuPG5LoGBcn4S91W' \\\n--data-raw 'Hello from service'\n```\n\n## Use Loogger service\n\nLoogger is a service to send various notifications.\nNowdays, it has only one driver: `Telegram`.\n\nThe service located at `https://loogger.mockery.dev`.\n\nTo use the Loogger service you should register there through Telegram:\n\n- Add tg-bot `@Loogger` to your group or direct chat to it.\n- To register into Loogger:  \n  _For person chat_: you should send auth data to it.  \n  _For group chat_: nothing.\n- Create a service: `/add`\n\nA full list of commands you receive on `/help`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fefureev%2Floogger-driver-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fefureev%2Floogger-driver-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fefureev%2Floogger-driver-php/lists"}