PHP code example of davidecesarano / embryo-logger
1. Go to this page and download the library: Download davidecesarano/embryo-logger 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/ */
davidecesarano / embryo-logger example snippets
use Embryo\Log\StreamLogger;
$logPath = __DIR__.DIRECTORY_SEPARATOR.'logs';
$logger = new StreamLogger($logPath);
$message = "User {username} created";
$context = ['username' => 'bolivar'];
// info log
$logger->info($message, $context);