ConsoleLogger

class ConsoleLogger extends AbstractLogger PSR-3 compliant console logger. Constants INFO ERROR Methods __construct(OutputInterface $output, array $verbosityLevelMap = array(), array $formatLevelMap = array()) log($level, $message, array $context = array()) {@inheritdoc} Details __construct(OutputInterface $output, array $verbosityLevelMap = array(), array $formatLevelMap = array()) Parameters OutputInterface $output array $ve

ConsoleHandler::onCommand()

onCommand(ConsoleCommandEvent $event) Before a command is executed, the handler gets activated and the console output is set in order to know where to write the logs. Parameters ConsoleCommandEvent $event

ConsoleHandler::onTerminate()

onTerminate(ConsoleTerminateEvent $event) After a command has been executed, it disables the output. Parameters ConsoleTerminateEvent $event

ConsoleHandler::setOutput()

setOutput(OutputInterface $output) Sets the console output to use for printing logs. Parameters OutputInterface $output The console output to use

ConsoleHandler::isHandling()

isHandling(array $record) {@inheritdoc} Parameters array $record

ConsoleHandler

class ConsoleHandler extends AbstractProcessingHandler implements EventSubscriberInterface Writes logs to the console output depending on its verbosity setting. It is disabled by default and gets activated as soon as a command is executed. Instead of listening to the console events, the output can also be set manually. The minimum logging level at which this handler will be triggered depends on the verbosity setting of the console output. The default mapping is: - OutputInterface::VERBOSITYN

ConsoleFormatter

class ConsoleFormatter extends LineFormatter Formats incoming records for console output by coloring them depending on log level. Constants SIMPLE_FORMAT Methods __construct($format = null, $dateFormat = null, $allowInlineLineBreaks = false, $ignoreEmptyContextAndExtra = true) {@inheritdoc} format(array $record) {@inheritdoc} Details __construct($format = null, $dateFormat = null, $allowInlineLineBreaks = false, $ignoreEmptyContextAndExtra = tr

ConsoleHandler::close()

close() Disables the output.

ConsoleHandler::getSubscribedEvents()

static array getSubscribedEvents() Returns an array of event names this subscriber wants to listen to. The array keys are event names and the value can be: The method name to call (priority defaults to 0) An array composed of the method name to call and the priority An array of arrays composed of the method names to call and respective priorities, or 0 if unset For instance: array('eventName' => 'methodName') array('eventName' => array('methodName', $priority)) a

ConsoleHandler::handle()

handle(array $record) {@inheritdoc} Parameters array $record