PHP code example of bufferapp / php-bufflog

1. Go to this page and download the library: Download bufferapp/php-bufflog library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

bufferapp / php-bufflog example snippets


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");

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"
                        ]
                    ]
                );
bash
composer