'using monolog with php [closed]
I am having this code to execute in a local host and I am using wamp server for php5.3 x64 bit and I am unable to execute this code and I am very new to php.
Is there any code changes or any additions to this code?
My file name is monolog_usage_1.php
and I copied monolog file in src
of https://github.com/Seldaek/monolog downloaded one to the same directory.
use \Monolog\Logger;
use \Monolog\Handler\StreamHandler;
include '\Monolog\Logger.php';
// create a log channel
$log = new Logger('name');
$log->pushHandler(new StreamHandler('D:\addlog.log', Logger::WARNING));
// add records to the log
What I pass as the name To the logger('name'), is it any method name like ERROR, ALERT... Thanks in advance..
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
