|
| 1 | +<?php |
| 2 | + |
| 3 | +return [ |
| 4 | + 'http' => [ |
| 5 | + 'enabled' => env('RUN_HTTP_LOG', true), |
| 6 | + |
| 7 | + /* |
| 8 | + * The log profile which determines whether a request should be logged. |
| 9 | + * It should implement `HttpLogProfile`. |
| 10 | + */ |
| 11 | + 'log_profile' => \KitLoong\AppLogger\HttpLog\LogProfile::class, |
| 12 | + |
| 13 | + /* |
| 14 | + * The log writer used to write the request to a log. |
| 15 | + * It should implement `HttpLogWriter`. |
| 16 | + */ |
| 17 | + 'log_writer' => \KitLoong\AppLogger\HttpLog\LogWriter::class, |
| 18 | + |
| 19 | + /* |
| 20 | + * If you are using default `HttpLogProfile` provided by the package, |
| 21 | + * you could define which HTTP methods should be logged. |
| 22 | + */ |
| 23 | + 'should_log' => [ |
| 24 | + \Illuminate\Http\Request::METHOD_POST, |
| 25 | + \Illuminate\Http\Request::METHOD_PUT, |
| 26 | + \Illuminate\Http\Request::METHOD_PATCH, |
| 27 | + \Illuminate\Http\Request::METHOD_DELETE |
| 28 | + ], |
| 29 | + |
| 30 | + /* |
| 31 | + * Filter out body fields which will never be logged. |
| 32 | + */ |
| 33 | + 'except' => [ |
| 34 | + 'password', |
| 35 | + 'password_confirmation', |
| 36 | + ], |
| 37 | + |
| 38 | + /* |
| 39 | + * Log channel name define in config/logging.php |
| 40 | + * null value to use default channel. |
| 41 | + */ |
| 42 | + 'channel' => null, |
| 43 | + ], |
| 44 | + |
| 45 | + 'performance' => [ |
| 46 | + 'enabled' => env('RUN_PERFORMANCE_LOG', true), |
| 47 | + |
| 48 | + /* |
| 49 | + * The log profile which determines whether a request should be logged. |
| 50 | + * It should implement `PerformanceLogProfile`. |
| 51 | + */ |
| 52 | + 'log_profile' => \KitLoong\AppLogger\PerformanceLog\LogProfile::class, |
| 53 | + |
| 54 | + /* |
| 55 | + * The log writer used to write the request to a log. |
| 56 | + * It should implement `PerformanceLogWriter`. |
| 57 | + */ |
| 58 | + 'log_writer' => \KitLoong\AppLogger\PerformanceLog\LogWriter::class, |
| 59 | + |
| 60 | + /* |
| 61 | + * If you are using default `PerformanceLogProfile` provided by the package, |
| 62 | + * you could define which HTTP methods should be logged. |
| 63 | + */ |
| 64 | + 'should_log' => [ |
| 65 | + \Illuminate\Http\Request::METHOD_GET, |
| 66 | + \Illuminate\Http\Request::METHOD_POST, |
| 67 | + \Illuminate\Http\Request::METHOD_PUT, |
| 68 | + \Illuminate\Http\Request::METHOD_PATCH, |
| 69 | + \Illuminate\Http\Request::METHOD_DELETE |
| 70 | + ], |
| 71 | + |
| 72 | + /* |
| 73 | + * Log channel name define in config/logging.php |
| 74 | + * null value to use default channel. |
| 75 | + */ |
| 76 | + 'channel' => null, |
| 77 | + ], |
| 78 | + |
| 79 | + 'query' => [ |
| 80 | + 'enabled' => env('RUN_QUERY_LOG', true), |
| 81 | + |
| 82 | + /* |
| 83 | + * The log profile which determines whether a request should be logged. |
| 84 | + * It should implement `QueryLogProfile`. |
| 85 | + */ |
| 86 | + 'log_profile' => \KitLoong\AppLogger\QueryLog\LogProfile::class, |
| 87 | + |
| 88 | + /* |
| 89 | + * The log writer used to write the request to a log. |
| 90 | + * It should implement `QueryLogWriter`. |
| 91 | + */ |
| 92 | + 'log_writer' => \KitLoong\AppLogger\QueryLog\LogWriter::class, |
| 93 | + |
| 94 | + /* |
| 95 | + * Log channel name define in config/logging.php |
| 96 | + * null value to use default channel. |
| 97 | + */ |
| 98 | + 'channel' => null, |
| 99 | + ] |
| 100 | +]; |
0 commit comments