noroman / php-tglogger
Logging in telegram chats, channels.
Installs: 1 281
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Requires
- php: >=7.4.0
- ext-curl: *
- ext-json: *
- ext-mbstring: *
This package is auto-updated.
Last update: 2025-01-19 12:02:13 UTC
README
Logging in telegram chats, channels.
Example
<?php use TgLogger\TgLogger; require_once __DIR__ . '/../vendor/autoload.php'; $chatId = -100…92; $botToken = '528…74:AA…0s'; $log = new TgLogger($botToken, $chatId, 'project name [optional]'); try { $log->Error('test error', ['id' => 4, 'firstName' => 'Roman', 'lastName' => 'Novikov']); } catch (Exception $e) { // to the standard log error_log($e->getMessage() .':: '. $log->getMessage()); }