forked from gehaxelt/PHP-Logger-Class
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
25 lines (19 loc) · 776 Bytes
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<?php
require_once('../gehaxelt/fileLogger/Compatibility.php');
require_once('../gehaxelt/fileLogger/FileLogger.php');
require_once('../gehaxelt/fileLogger/PackageInfo.php');
use gehaxelt\fileLogger\Compatibility;
use gehaxelt\fileLogger\CompatibilityException;
use gehaxelt\fileLogger\FileLogger;
use gehaxelt\fileLogger\PackageInfo as FLPackageInfo;
try {
$compat = Compatibility::check();
} catch(CompatibilityException $e){
die($e->getMessage());
}
$log = new FileLogger(__DIR__.'/logs/example.log.php');
$log->log('Example Notice', FileLogger::NOTICE);
$log->log('Example Warning', FileLogger::WARNING);
$log->log('Example Error', FileLogger::ERROR);
$log->log('Example Fatal', FileLogger::FATAL);
echo '<pre>', print_r(FLPackageInfo::getInfo()), '</pre>';