PHP code example of nbah1990 / laravel-logger-extension
1. Go to this page and download the library: Download nbah1990/laravel-logger-extension library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
nbah1990 / laravel-logger-extension example snippets
return [
// pass true to enable log of all guzzle requests
'guzzle_log_integration_enabled' => false,
// guzzle client config with additions for logger
'guzzle_log_integration' => [
// you can add other guzzle client settings here
// you can set your own handler for guzzle client
// 'handler' => new \GuzzleHttp\HandlerStack(),
// pass channels that should be used to write logs, they should be defined in the 'logging.php' configuration
'log_channels' => [
],
// format of the log message
'log_formatter' => new \GuzzleHttp\MessageFormatter(
'{method}({code}) - {uri} - {req_body} - {res_body} - {req_headers} - {error}'
),
//by default all responses will be wrote with this level
'log_default_level' => Psr\Log\LogLevel::DEBUG
]
];
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.