AdminCP > Tools > Checks and tests > Test Monologinternal_data/monolog.log - this is configurable.use Monolog\Helper\Log;
Log::info('an info message', ['context' => 'foo']);
Log::error('an error message', ['data' => 'bar']);
$logger = \XF::app()->get('monolog')->newChannel('myaddon');
$logger->warning('a warning message', ['context' => 'foo']);
use Monolog\Logger;
$monolog = \XF::app()->get('monolog');
$streamhandler = $monolog->stream(); // return our default stream handler for logging to a file
//(or create your own!)
/** @var Monolog\Logger $logger */
$logger = $monolog->logger('myaddon');
$logger->pushHandler($streamhandler); // push our stream handler onto the handler stack
// you can apply any other customisations you like here as well by adding custom handlers, formatters or processors
$logger->critical('a critical message', ['context' => 'foo']);
AdminCP > Tools > Checks and tests > Test Monologinternal_data/monolog.log - this is configurable.use Monolog\Helper\Log;
Log::info('an info message', ['context' => 'foo']);
Log::error('an error message', ['data' => 'bar']);
$logger = \XF::app()->get('monolog')->newChannel('myaddon');
$logger->warning('a warning message', ['context' => 'foo']);
use Monolog\Logger;
$monolog = \XF::app()->get('monolog');
$streamhandler = $monolog->stream(); // return our default stream handler for logging to a file
//(or create your own!)
/** @var Monolog\Logger $logger */
$logger = $monolog->logger('myaddon');
$logger->pushHandler($streamhandler); // push our stream handler onto the handler stack
// you can apply any other customisations you like here as well by adding custom handlers, formatters or processors
$logger->critical('a critical message', ['context' => 'foo']);
This resource has a discussion thread on the forum where you can ask questions, report issues, and talk with the author and other users.
Inactive member accounts are automatically deleted after 1 month. Some countries cannot register and are not allowed to register on this website, there is a reason for that.
All duplicate accounts will be banned and a warning will be issued to the primary account holder.
To ensure a positive and productive experience for everyone, please take a moment to review the site's guidelines and community rules outlined in the link here. Website Rules of Conduct