Skip to content

Commit

Permalink
Rename DefaultLogProfile to LogNonGetRequests
Browse files Browse the repository at this point in the history
  • Loading branch information
brendt committed Oct 18, 2017
1 parent a6b8e35 commit 7bff935
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 10 deletions.
14 changes: 10 additions & 4 deletions README.md
Expand Up @@ -31,10 +31,16 @@ This is the contents of the published config file:
return [

/*
* The log profile used to log requests. A log profile determines wheter a request will be,
* logged or not, and how the message is formatted. It should implement `LogProfile``.
* The log profile which determines whether a request should be logged.
* It should implement `LogProfile`.
*/
'log_profile' => \Spatie\HttpLogger\DefaultLogProfile::class,
'log_profile' => \Spatie\HttpLogger\LogNonGetRequests::class,

/*
* The log writer used to write the request to a log.
* It should implement `LogWriter`.
*/
'log_writer' => \Spatie\HttpLogger\DefaultLogWriter::class,

/*
* Filter out body fields which will never be logged.
Expand Down Expand Up @@ -85,7 +91,7 @@ A custom log profile must implement `\Spatie\HttpLogger\LogProfile`.
This interface requires you to implement `shouldHandleRequest`.

```php
// Example implementation from `\Spatie\HttpLogger\DefaultLogProfile`
// Example implementation from `\Spatie\HttpLogger\LogNonGetRequests`

public function shouldLogRequest(Request $request): bool
{
Expand Down
2 changes: 1 addition & 1 deletion config/http-logger.php
Expand Up @@ -6,7 +6,7 @@
* The log profile which determines whether a request should be logged.
* It should implement `LogProfile`.
*/
'log_profile' => \Spatie\HttpLogger\DefaultLogProfile::class,
'log_profile' => \Spatie\HttpLogger\LogNonGetRequests::class,

/*
* The log writer used to write the request to a log.
Expand Down
2 changes: 1 addition & 1 deletion src/DefaultLogProfile.php → src/LogNonGetRequests.php
Expand Up @@ -4,7 +4,7 @@

use Illuminate\Http\Request;

class DefaultLogProfile implements LogProfile
class LogNonGetRequests implements LogProfile
{
public function shouldLogRequest(Request $request): bool
{
Expand Down
Expand Up @@ -2,18 +2,18 @@

namespace Spatie\HttpLogger\Test;

use Spatie\HttpLogger\DefaultLogProfile;
use Spatie\HttpLogger\LogNonGetRequests;

class DefaultLogProfileTest extends TestCase
class LogNonGetRequestsTest extends TestCase
{
/** @var \Spatie\HttpLogger\DefaultLogProfile */
/** @var \Spatie\HttpLogger\LogNonGetRequests */
protected $logProfile;

public function setUp()
{
parent::setup();

$this->logProfile = new DefaultLogProfile();
$this->logProfile = new LogNonGetRequests();
}

/** @test */
Expand Down

0 comments on commit 7bff935

Please sign in to comment.