PHP logger for all Buffer services
PHP 8.1 and later.
You can install the bindings via Composer. Run the following command:
composer require bufferapp/php-bufflogAs simple as...
use Buffer\BuffLog\BuffLog;
BuffLog::debug("I am a debug");
BuffLog::info("I am an info");
BuffLog::warning("I am a warning");
BuffLog::error("I am an error");
BuffLog::critical("I am a warning");If you wish add more context in your logs,
BuffLog::debug("some context", ["my key" => " my value"]);
BuffLog::info("I am a info with context", ["my key" => " my value"]);
BuffLog::warning("I am a warning", ["duration" => "40ms"]);
BuffLog::critical("I'm critical log, here some extra fancy informations", [
"duration" => "40ms",
"services_related" => [
"Twitter",
"Facebook",
"Instagram"
]
]
);If you wish to see more logs, simply set the LOG_LEVEL to the desired level. Here the list with their level and their use case:
