patriot / plog
Telegram Log WebService
Installs: 9
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/patriot/plog
Requires
- php: >=5.3.0
This package is auto-updated.
Last update: 2025-10-29 02:29:50 UTC
README
Rest-Full webservice for sending message to telegram groups or users throw Telegram Bot Api
Installation
Using Composer
composer require patriot/plog:dev-master
then, require composer autoloader:
require __DIR__.'/../vendor/autoload.php';
you should create config.php file (copy config-sample.php) and put your credentials in it.
cd src/PLog
cp config-sample.php config.php
Config File Attributes
username: Your Inception username
password: Your Inception password
default_receiver: default Telegram group for sending logs to
How to Use
first add namespace
use PLog\PLog;
then:
$result = PLog::Send('new record saved', 'LogGroup');
or if you set default_receiver:
$result = PLog::Send('new record saved');
for loging exceptions:
try{ //do some risky staff ;) }catch(Exception $e){ $result = PLog::Exception($e, 'ExceptionGroup'); }