PHP code example of prinx / notify

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

    

prinx / notify example snippets


$logger = new Log($file);
$logger->info('User 1 has logged in.');

$logger->debug('Debug level event has happened.');

$logger->info('Info level event has happened.');

$logger->notice('Notice level event has happened.');

$logger->warning('Warning level event has happened.');

$logger->error('Error level event has happened.');

$logger->critical('Critical level event has happened.');

$logger->alert('Alert level event has happened.');

$logger->emergency('Emergency level event has happened.');

$logger->setFile('path/to/log/file');

$logger->remove();

// Eg:
$logger->info('User logged in')
    ->setFile('error.log')
    ->error('An error happened.');