PHP code example of cxj / phpsyslog
1. Go to this page and download the library: Download cxj/phpsyslog 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/ */
cxj / phpsyslog example snippets
$ident = basename($argv[0]);
$logger = new Cxj\Logger($ident, Psr\Log\LogLevel::WARNING);
// Will be logged.
$logger->alert("This is an alert level message.");
// Not logged because lower level than default WARNING level set in constructor.
$logger->debug("This is a debug level message.");