Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change Log contract to LoggerInterface. #1624

Merged
merged 1 commit into from
Feb 16, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/DataTableAbstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
namespace Yajra\DataTables;

use Illuminate\Support\Str;
use Psr\Log\LoggerInterface;
use Illuminate\Http\JsonResponse;
use Illuminate\Contracts\Logging\Log;
use Yajra\DataTables\Utilities\Helper;
use Illuminate\Support\Traits\Macroable;
use Yajra\DataTables\Contracts\DataTable;
Expand Down Expand Up @@ -32,7 +32,7 @@ abstract class DataTableAbstract implements DataTable, Arrayable, Jsonable
public $request;

/**
* @var \Illuminate\Contracts\Logging\Log
* @var \Psr\Log\LoggerInterface
*/
protected $logger;

Expand Down Expand Up @@ -720,22 +720,22 @@ protected function errorResponse(\Exception $exception)
/**
* Get monolog/logger instance.
*
* @return \Illuminate\Contracts\Logging\Log
* @return \Psr\Log\LoggerInterface
*/
public function getLogger()
{
$this->logger = $this->logger ?: app(Log::class);
$this->logger = $this->logger ?: app(LoggerInterface::class);

return $this->logger;
}

/**
* Set monolog/logger instance.
*
* @param \Illuminate\Contracts\Logging\Log $logger
* @param \Psr\Log\LoggerInterface $logger
* @return $this
*/
public function setLogger(Log $logger)
public function setLogger(LoggerInterface $logger)
{
$this->logger = $logger;

Expand Down