1 | <?php |
||
37 | class LogTarget extends Target |
||
38 | { |
||
39 | /** |
||
40 | * @var string The channel of the message send to. |
||
41 | */ |
||
42 | public $channel; |
||
43 | /** |
||
44 | * @var string The logger title. |
||
45 | */ |
||
46 | public $title; |
||
47 | /** |
||
48 | * @var Pubu |
||
49 | */ |
||
50 | public $robot; |
||
51 | |||
52 | /** |
||
53 | * {@inheritdoc} |
||
54 | */ |
||
55 | 1 | public function init() |
|
64 | |||
65 | /** |
||
66 | * Exports log [[messages]] to a specific destination. |
||
67 | */ |
||
68 | 1 | public function export() |
|
72 | |||
73 | /** |
||
74 | * ~~~ |
||
75 | * [ |
||
76 | * 'title' => 'this is title', |
||
77 | * 'description' => 'this is description', |
||
78 | * 'url' => 'http://www.baidu.com', |
||
79 | * 'color' => 'success' |
||
80 | * ] |
||
81 | * ~~~. |
||
82 | * |
||
83 | * @return array |
||
84 | */ |
||
85 | 1 | private function getAttachments() |
|
99 | |||
100 | /** |
||
101 | * @param int $level |
||
102 | * |
||
103 | * @return string |
||
104 | */ |
||
105 | 1 | private function getLevelColor($level) |
|
120 | } |
||
121 |