Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
62.50% |
5 / 8 |
|
50.00% |
1 / 2 |
CRAP | |
0.00% |
0 / 1 |
FlyMSGLogger | |
62.50% |
5 / 8 |
|
50.00% |
1 / 2 |
2.21 | |
0.00% |
0 / 1 |
logInfo | |
0.00% |
0 / 3 |
|
0.00% |
0 / 1 |
2 | |||
logError | |
100.00% |
5 / 5 |
|
100.00% |
1 / 1 |
1 |
1 | <?php |
2 | |
3 | namespace App\Helpers; |
4 | |
5 | use Illuminate\Support\Facades\Log; |
6 | |
7 | abstract class FlyMSGLogger { |
8 | public static function logInfo($tag = "FlyMSG", $message) { |
9 | Log::info([$tag => [ |
10 | 'message' => $message, |
11 | ]]); |
12 | } |
13 | public static function logError($tag = "-", $throwable) { |
14 | Log::error([$tag => [ |
15 | 'message' => $throwable->getMessage(), |
16 | 'file' => $throwable->getFile(), |
17 | 'line' => $throwable->getLine(), |
18 | ]]); |
19 | } |
20 | } |