Note that there are some explanatory texts on larger screens.

plurals
  1. POInterface 'Psr\Log\LoggerInterface' not found in /opt/lampp/vhosts/development.com/htdocs/test/Monolog/Logger.php
    primarykey
    data
    text
    <p>I am trying to execute basic example of monolog. I have tried follwing code.</p> <p>My index.php file is</p> <pre><code> &lt;?php include_once __DIR__ . '/Psr/Log/LoggerInterface'; include_once __DIR__ . '/Psr/Log/AbstractLogger'; include_once __DIR__ . '/Psr/Log/LogLevel'; include_once __DIR__ . '/Psr/Log/InvalidArgumentException'; include_once __DIR__ . '/Monolog/Logger.php'; include_once __DIR__ . '/Monolog/Handler/HandlerInterface.php'; include_once __DIR__ . '/Monolog/Handler/AbstractHandler.php'; include_once __DIR__ . '/Monolog/Handler/AbstractProcessingHandler.php'; include_once __DIR__ . '/Monolog/Handler/StreamHandler.php'; include_once __DIR__ . '/Monolog/Formatter/FormatterInterface.php'; include_once __DIR__ . '/Monolog/Formatter/NormalizerFormatter.php'; include_once __DIR__ . '/Monolog/Formatter/LineFormatter.php'; use Monolog\Logger; use Monolog\Handler\StreamHandler; $logger = new Logger("my_name"); $logger-&gt;pushHandler(new StreamHandler("test_log.log", Logger::DEBUG)); $log-&gt;addWarning('Foo'); $log-&gt;addError('Bar'); ?&gt; </code></pre> <p>I am getting following error </p> <pre><code>Fatal error: Interface 'Psr\Log\LoggerInterface' not found in /opt/lampp/vhosts/development.com/htdocs/test/Monolog/Logger.php on line 28 </code></pre> <p>My folder structure is </p> <pre><code>/opt/lampp/vhosts/development.com/htdocs/test /opt/lampp/vhosts/development.com/htdocs/test/Monolog /opt/lampp/vhosts/development.com/htdocs/test/Psr /opt/lampp/vhosts/development.com/htdocs/test/index.php </code></pre> <p>Could you please suggest me about this. Thanks in advance.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload