eos-project / phpclient
Eos PHP client
0.1.0
2015-06-27 10:50 UTC
Requires
- psr/log: ^1.0
This package is not auto-updated.
Last update: 2024-04-13 15:01:18 UTC
README
Simple static usage
Eos client can be used from static context
\Eos\Client\Eos::sendString("Foo"); // Wont be sent - Eos not initialized \Eos\Client\Eos::init("realm", "secret", "hostname"); // Initialize \Eos\Client\Eos::sendString("Foo"); // Delivered using UDP \Eos\Client\Eos::send(["message" => "hello", "ip" => $_SERVER["REMOTE_ADDR"]]); // Delivered using UDP
psr3
Eos client bundled with \Eos\Client\EosDefaultLogger
which is fully PSR3-compatible with configurable
logging threshold level
$l = new \Eos\Client\EosDefaultLogger("xxx", "yyy", "localhost", null, ["demo"], \Psr\Log\LogLevel::INFO); $l->debug("debug"); // Ignored due threshold $l->info("info"); // Delivered $l->notice("notice"); // Delivered