ngs-doo/dsl-client-php — pull request #2 by rpetrano (2013-10-07 16:56:03+00:00)
Title: Implemented logging.

Added class Logger, which manages set of logging plugins.
By default, logging is disabled.

Implemented two logging plugins: FileLogger and XMPPLogger.
First one dumps messages to a file.
Second one sends messages to Node.js server (https://bitbucket.org/element_doo/dsl-logging-server) to send them over XMPP protocol.
Added logging of REST Http requests.

Example usage.
Index.php:

require_once __DIR__.'/../platform/Bootstrap.php';
use NGS\Logger;
use NGS\FileLogger;
use NGS\XmppLogger;
$logger = new Logger(array(
new XMPPLogger('http://localhost:9989'),
new FileLogger(__DIR__.'/logs.txt')
), Logger::INFO);
Logger::instance($logger);