7 use Monolog\Formatter\FormatterInterface;
 
    8 use Monolog\Formatter\LineFormatter;
 
    9 use Monolog\Handler\AbstractProcessingHandler;
 
   11 use Monolog\LogRecord;
 
   12 use Symfony\Component\Console\Output\NullOutput;
 
   13 use Symfony\Component\Console\Output\OutputInterface;
 
   30         if (!ElggApplication::isCli()) {
 
   31             throw new Exception(__CLASS__ . 
' can only be used during CLI');
 
   36         $level = Level::Emergency;
 
   37         if ($this->stdout->getVerbosity() !== OutputInterface::VERBOSITY_QUIET) {
 
   38             $level = Level::Debug;
 
   41         parent::__construct($level, $bubble);
 
   47     protected function write(LogRecord $record): void {
 
   48         $this->stdout?->
write($record->formatted);
 
   55         $formatter = new LineFormatter();
 
   56         $formatter->allowInlineLineBreaks();
 
   57         $formatter->ignoreEmptyContextAndExtra();
 
   66         $this->stdout = new NullOutput();
 
Additional output handler for the \Elgg\Logger\Cron which outputs to the stdout.
write(LogRecord $record)
{}
__construct(bool $bubble=true)
{}
Base exception of exceptions in the Elgg system.
_elgg_services()
Get the global service provider.