1 | <?php |
||
10 | class OutputLogger extends AbstractLogger |
||
11 | { |
||
12 | /** @var OutputInterface */ |
||
13 | protected $output; |
||
14 | |||
15 | /** @var bool */ |
||
16 | protected $alwaysLogErrors; |
||
17 | |||
18 | /** @var int|null */ |
||
19 | protected $verbosity; |
||
20 | |||
21 | /** @var string|null */ |
||
22 | protected $indent; |
||
23 | |||
24 | /** @var bool */ |
||
25 | protected $useTags; |
||
26 | |||
27 | /** |
||
28 | * Constructor |
||
29 | * |
||
30 | * @param OutputInterface $output output object, e.g. cli output |
||
31 | * @param bool $alwaysLogErrors always log messages with level more than ERROR |
||
32 | * @param int|null $verbosity verbosity level, NULL or OutputInterface::VERBOSITY_* |
||
33 | * @param string|null $indent ident string prefix - allow to prepend some string to all messages |
||
34 | * @param bool $useTags use message level-based output tags |
||
35 | */ |
||
36 | public function __construct( |
||
49 | |||
50 | /** |
||
51 | * {@inheritdoc} |
||
52 | */ |
||
53 | public function log($level, $message, array $context = array()) |
||
90 | |||
91 | /** |
||
92 | * Return verbosity level |
||
93 | * |
||
94 | * @return int |
||
95 | */ |
||
96 | protected function getVerbosity() |
||
102 | |||
103 | /** |
||
104 | * @param string $level |
||
105 | * @param string $message |
||
106 | * |
||
107 | * @return string |
||
108 | */ |
||
109 | protected function formatMessage($level, $message) |
||
121 | |||
122 | |||
123 | /** |
||
124 | * @param string $level |
||
125 | * |
||
126 | * @return string |
||
127 | */ |
||
128 | protected function getMessageTemplate($level) |
||
147 | } |
||
148 |