PHP code example of carlosafonso / logga

1. Go to this page and download the library: Download carlosafonso/logga 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/ */

    

carlosafonso / logga example snippets






$l = new \Logga\Logga();
$l->info('Hello world!');

$s = new FileStream(array('file' => 'my_custom_log_file', 'date' => TRUE));
$l = new Logga($s);
$l->info('Hi, custom file!');

$s1 = new FileStream(array('file' => 'my_first_custom_log_file', 'date' => TRUE));
$s2 = new FileStream(array('file' => 'my_second_custom_log_file', 'date' => TRUE));
$l = new Logga(array($s1, $s2));
$l->info('Hi, custom file!');