1 | <?php |
||
20 | class Logger |
||
21 | { |
||
22 | /** |
||
23 | * @var string $name |
||
24 | */ |
||
25 | protected $name; |
||
26 | |||
27 | /** |
||
28 | * @var IOInterface $inputOutput |
||
29 | */ |
||
30 | protected $inputOutput; |
||
31 | |||
32 | /** |
||
33 | * @param string $name |
||
34 | * @param IOInterface $io |
||
35 | */ |
||
36 | 220 | public function __construct($name, IOInterface $io) |
|
41 | |||
42 | /** |
||
43 | * Log a debug message |
||
44 | * |
||
45 | * Messages will be output at the "very verbose" logging level (eg `-vv` |
||
46 | * needed on the Composer command). |
||
47 | * |
||
48 | * @param string $message |
||
49 | */ |
||
50 | 180 | public function debug($message) |
|
57 | |||
58 | /** |
||
59 | * Log an informative message |
||
60 | * |
||
61 | * Messages will be output at the "verbose" logging level (eg `-v` needed |
||
62 | * on the Composer command). |
||
63 | * |
||
64 | * @param string $message |
||
65 | */ |
||
66 | 190 | public function info($message) |
|
73 | |||
74 | /** |
||
75 | * Log a warning message |
||
76 | * |
||
77 | * @param string $message |
||
78 | */ |
||
79 | 10 | public function warning($message) |
|
84 | |||
85 | /** |
||
86 | * Write a message |
||
87 | * |
||
88 | * @param string $message |
||
89 | */ |
||
90 | 20 | protected function log($message) |
|
101 | } |
||
102 | // vim:sw=4:ts=4:sts=4:et: |
||
103 |