thesaturn / xmpplogger
PSR3 compliant XMPPLogger for PHP
Installs: 26
Dependents: 1
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
pkg:composer/thesaturn/xmpplogger
Requires
- php: >=5.3.3
- fabiang/xmpp: ^0.6.1
- psr/log: ~1.0
Suggests
- psr/log-implementation: Allows more advanced logging of the xmpp connection
This package is not auto-updated.
Last update: 2025-09-28 03:31:10 UTC
README
This is simple PSR3 compliant XMPPLogger for PHP. Uses Fabiang XMPP client for sending messages.
System requirements
PHP >= 5.3
Usage:
At first you need to set up xmpp connection:
use Fabiang\Xmpp\Options;
use Fabiang\Xmpp\Client;
$options = new Options('tcp://example.com:5222');
$options->setUsername('twilight')->setPassword('sparkle');
$client = new Client($options);
Now you can create logger
use \thesaturn\xmpplogger\XMPPLogger;
$log = new XMPPLogger($client, $config['xmpp']['to'], 'debug');
$log->info("Hello log");
Installation
Add following lines to the composer:
"require": {
"thesaturn/xmpplogger": "1.0"
}