MediaWiki master
ProfilerOutput.php
Go to the documentation of this file.
1<?php
8
11use Psr\Log\LoggerInterface;
12
19abstract class ProfilerOutput {
21 protected $collector;
23 protected $logger;
25 protected $params;
26
31 public function __construct( Profiler $collector, array $params ) {
32 $this->collector = $collector;
33 $this->params = $params;
34 $this->logger = LoggerFactory::getInstance( 'profiler' );
35 }
36
41 public function canUse() {
42 return true;
43 }
44
50 public function logsToOutput() {
51 return false;
52 }
53
62 abstract public function log( array $stats );
63}
64
66class_alias( ProfilerOutput::class, 'ProfilerOutput' );
Create PSR-3 logger objects.
Base class for profiling output.
logsToOutput()
May the log() try to write to standard output?
__construct(Profiler $collector, array $params)
canUse()
Can this output type be used?
log(array $stats)
Log MediaWiki-style profiling data.
array $params
Configuration of $wgProfiler.
Profiler base class that defines the interface and some shared functionality.
Definition Profiler.php:25