Skip to content

Commit

Permalink
Merge pull request #295 from ARCANEDEV/update-package
Browse files Browse the repository at this point in the history
Updating the package
  • Loading branch information
arcanedev-maroc committed Oct 2, 2019
2 parents fc65898 + 55e0126 commit 547ae2a
Show file tree
Hide file tree
Showing 16 changed files with 61 additions and 265 deletions.
6 changes: 3 additions & 3 deletions README.md
@@ -1,4 +1,4 @@
# LogViewer [![Packagist License][badge_license]](LICENSE.md) [![For Laravel 5][badge_laravel]][link-github-repo]
# LogViewer [![Packagist License][badge_license]](LICENSE.md) [![For Laravel][badge_laravel]][link-github-repo]

[![Travis Status][badge_build]][link-travis]
[![Coverage Status][badge_coverage]][link-scrutinizer]
Expand All @@ -23,7 +23,7 @@ Feel free to check out the [releases](https://github.com/ARCANEDEV/LogViewer/rel
## Features

- A great Log viewer API.
- Laravel `5.x` & `6.0` are supported.
- Laravel `5.x` & `6.x` are supported.
- Ready to use (Views, Routes, controllers … Out of the box) [Note: No need to publish assets]
- View, paginate, filter, download and delete logs.
- Load a custom logs storage path.
Expand Down Expand Up @@ -93,7 +93,7 @@ If you discover any security related issues, please email arcanedev.maroc@gmail.
![Logs list](https://raw.githubusercontent.com/ARCANEDEV/LogViewer/master/_screenshots/2-logs-list.jpg)
![Single log](https://raw.githubusercontent.com/ARCANEDEV/LogViewer/master/_screenshots/3-single-log.jpg)

[badge_laravel]: https://img.shields.io/badge/Laravel-5.x%20to%206.0-orange.svg?style=flat-square
[badge_laravel]: https://img.shields.io/badge/Laravel-5.x%20to%206.x-orange.svg?style=flat-square
[badge_license]: https://img.shields.io/packagist/l/arcanedev/log-viewer.svg?style=flat-square
[badge_build]: https://img.shields.io/travis/ARCANEDEV/LogViewer.svg?style=flat-square
[badge_coverage]: https://img.shields.io/scrutinizer/coverage/g/ARCANEDEV/LogViewer.svg?style=flat-square
Expand Down
4 changes: 2 additions & 2 deletions _docs/0.Home.md
@@ -1,11 +1,11 @@
# LogViewer

This package allows you to keep track of each one of your logs stored under `storage_path('logs')` for Laravel 5.
This package allows you to keep track of each one of your logs stored under `storage_path('logs')` for Laravel.

## Features

- A great Log viewer API.
- Laravel `5.x` & `6.0` are supported.
- Laravel `5.x` & `6.x` are supported.
- Ready to use (Views, Routes, controllers … Out of the box) [Note: No need to publish assets]
- View, paginate, filter, download and delete logs.
- Load a custom logs storage path.
Expand Down
19 changes: 9 additions & 10 deletions _docs/1.Installation-and-Setup.md
Expand Up @@ -29,7 +29,7 @@ Laravel uses the [Monolog PHP logging library](https://github.com/Seldaek/monolo
| ![LogViewer v4.5.x][log_viewer_4_5_x] | ![Laravel v5.6][laravel_5_6] |
| ![LogViewer v4.6.x][log_viewer_4_6_x] | ![Laravel v5.7][laravel_5_7] |
| ![LogViewer v4.7.x][log_viewer_4_7_x] | ![Laravel v5.8][laravel_5_8] |
| ![LogViewer v5.0.x][log_viewer_5_0_x] | ![Laravel v6.0][laravel_6_0] |
| ![LogViewer v5.x][log_viewer_5_x] | ![Laravel v6.x][laravel_6_x] |

[laravel_5_0]: https://img.shields.io/badge/v5.0-supported-brightgreen.svg?style=flat-square "Laravel v5.0"
[laravel_5_1]: https://img.shields.io/badge/v5.1-supported-brightgreen.svg?style=flat-square "Laravel v5.1"
Expand All @@ -40,15 +40,15 @@ Laravel uses the [Monolog PHP logging library](https://github.com/Seldaek/monolo
[laravel_5_6]: https://img.shields.io/badge/v5.6-supported-brightgreen.svg?style=flat-square "Laravel v5.6"
[laravel_5_7]: https://img.shields.io/badge/v5.7-supported-brightgreen.svg?style=flat-square "Laravel v5.7"
[laravel_5_8]: https://img.shields.io/badge/v5.8-supported-brightgreen.svg?style=flat-square "Laravel v5.8"
[laravel_6_0]: https://img.shields.io/badge/v6.0-supported-brightgreen.svg?style=flat-square "Laravel v6.0"
[laravel_6_x]: https://img.shields.io/badge/v6.x-supported-brightgreen.svg?style=flat-square "Laravel v6.x"

[log_viewer_4_2_x]: https://img.shields.io/badge/version-4.2.*-blue.svg?style=flat-square "LogViewer v4.2.*"
[log_viewer_4_3_x]: https://img.shields.io/badge/version-4.3.*-blue.svg?style=flat-square "LogViewer v4.3.*"
[log_viewer_4_4_x]: https://img.shields.io/badge/version-4.4.*-blue.svg?style=flat-square "LogViewer v4.4.*"
[log_viewer_4_5_x]: https://img.shields.io/badge/version-4.5.*-blue.svg?style=flat-square "LogViewer v4.5.*"
[log_viewer_4_6_x]: https://img.shields.io/badge/version-4.6.*-blue.svg?style=flat-square "LogViewer v4.6.*"
[log_viewer_4_7_x]: https://img.shields.io/badge/version-4.7.*-blue.svg?style=flat-square "LogViewer v4.7.*"
[log_viewer_5_0_x]: https://img.shields.io/badge/version-5.0.*-blue.svg?style=flat-square "LogViewer v5.0.*"
[log_viewer_4_2_x]: https://img.shields.io/badge/version-4.2.x-blue.svg?style=flat-square "LogViewer v4.2.x"
[log_viewer_4_3_x]: https://img.shields.io/badge/version-4.3.x-blue.svg?style=flat-square "LogViewer v4.3.x"
[log_viewer_4_4_x]: https://img.shields.io/badge/version-4.4.x-blue.svg?style=flat-square "LogViewer v4.4.x"
[log_viewer_4_5_x]: https://img.shields.io/badge/version-4.5.x-blue.svg?style=flat-square "LogViewer v4.5.x"
[log_viewer_4_6_x]: https://img.shields.io/badge/version-4.6.x-blue.svg?style=flat-square "LogViewer v4.6.x"
[log_viewer_4_7_x]: https://img.shields.io/badge/version-4.7.x-blue.svg?style=flat-square "LogViewer v4.7.x"
[log_viewer_5_x]: https://img.shields.io/badge/version-5.x-blue.svg?style=flat-square "LogViewer v5.x"

## Composer

Expand All @@ -58,7 +58,6 @@ E.g `composer require arcanedev/log-viewer:~4.6.0` for Laravel **v5.7**.

See the [Version compatibility](#version-compatibility) table above to choose the correct version.


## Laravel

### Setup
Expand Down
18 changes: 0 additions & 18 deletions _docs/2.Configuration.md
Expand Up @@ -150,24 +150,6 @@ return [
];
```

## Facade

```php
<?php

return [
// ...

/* -------------------------------------------------------------------------
| LogViewer's Facade
| -------------------------------------------------------------------------
*/
'facade' => 'LogViewer',

// ...
];
```

## Download

```php
Expand Down
12 changes: 6 additions & 6 deletions composer.json
Expand Up @@ -16,14 +16,14 @@
"require": {
"php": ">=7.2.0",
"ext-json": "*",
"psr/log": "~1.0",
"arcanedev/support": "~5.0.0"
"psr/log": "^1.0",
"arcanedev/support": "^5.0"
},
"require-dev": {
"orchestra/testbench": "~4.0.0",
"mockery/mockery": "~1.0",
"phpunit/phpcov": "~6.0",
"phpunit/phpunit": "~8.0"
"orchestra/testbench": "^4.0",
"mockery/mockery": "^1.0",
"phpunit/phpcov": "^6.0",
"phpunit/phpunit": "^8.0"
},
"autoload": {
"psr-4": {
Expand Down
7 changes: 0 additions & 7 deletions config/log-viewer.php
Expand Up @@ -65,13 +65,6 @@

'per-page' => 30,

/* -----------------------------------------------------------------
| LogViewer's Facade
| -----------------------------------------------------------------
*/

'facade' => 'LogViewer',

/* -----------------------------------------------------------------
| Download settings
| -----------------------------------------------------------------
Expand Down
20 changes: 0 additions & 20 deletions src/Facades/LogMenu.php

This file was deleted.

20 changes: 0 additions & 20 deletions src/Facades/LogStyler.php

This file was deleted.

20 changes: 0 additions & 20 deletions src/Facades/LogViewer.php

This file was deleted.

54 changes: 27 additions & 27 deletions src/LogViewer.php
Expand Up @@ -57,18 +57,18 @@ class LogViewer implements LogViewerContract
/**
* Create a new instance.
*
* @param \Arcanedev\LogViewer\Contracts\Utilities\Factory $factory
* @param \Arcanedev\LogViewer\Contracts\Utilities\Filesystem $filesystem
* @param \Arcanedev\LogViewer\Contracts\Utilities\LogLevels $levels
* @param \Arcanedev\LogViewer\Contracts\Utilities\Factory $factory
* @param \Arcanedev\LogViewer\Contracts\Utilities\Filesystem $filesystem
* @param \Arcanedev\LogViewer\Contracts\Utilities\LogLevels $levels
*/
public function __construct(
FactoryContract $factory,
FactoryContract $factory,
FilesystemContract $filesystem,
LogLevelsContract $levels
LogLevelsContract $levels
) {
$this->factory = $factory;
$this->factory = $factory;
$this->filesystem = $filesystem;
$this->levels = $levels;
$this->levels = $levels;
}

/* -----------------------------------------------------------------
Expand All @@ -79,7 +79,7 @@ public function __construct(
/**
* Get the log levels.
*
* @param bool $flip
* @param bool $flip
*
* @return array
*/
Expand All @@ -91,7 +91,7 @@ public function levels($flip = false)
/**
* Get the translated log levels.
*
* @param string|null $locale
* @param string|null $locale
*
* @return array
*/
Expand All @@ -103,7 +103,7 @@ public function levelsNames($locale = null)
/**
* Set the log storage path.
*
* @param string $path
* @param string $path
*
* @return self
*/
Expand All @@ -127,15 +127,15 @@ public function getPattern()
/**
* Set the log pattern.
*
* @param string $date
* @param string $prefix
* @param string $extension
* @param string $date
* @param string $prefix
* @param string $extension
*
* @return self
*/
public function setPattern(
$prefix = FilesystemContract::PATTERN_PREFIX,
$date = FilesystemContract::PATTERN_DATE,
$prefix = FilesystemContract::PATTERN_PREFIX,
$date = FilesystemContract::PATTERN_DATE,
$extension = FilesystemContract::PATTERN_EXTENSION
) {
$this->factory->setPattern($prefix, $date, $extension);
Expand All @@ -161,7 +161,7 @@ public function all()
/**
* Paginate all logs.
*
* @param int $perPage
* @param int $perPage
*
* @return \Illuminate\Pagination\LengthAwarePaginator
*/
Expand All @@ -173,7 +173,7 @@ public function paginate($perPage = 30)
/**
* Get a log.
*
* @param string $date
* @param string $date
*
* @return \Arcanedev\LogViewer\Entities\Log
*/
Expand All @@ -185,8 +185,8 @@ public function get($date)
/**
* Get the log entries.
*
* @param string $date
* @param string $level
* @param string $date
* @param string $level
*
* @return \Arcanedev\LogViewer\Entities\LogEntryCollection
*/
Expand All @@ -198,9 +198,9 @@ public function entries($date, $level = 'all')
/**
* Download a log file.
*
* @param string $date
* @param string|null $filename
* @param array $headers
* @param string $date
* @param string|null $filename
* @param array $headers
*
* @return \Symfony\Component\HttpFoundation\BinaryFileResponse
*/
Expand Down Expand Up @@ -228,7 +228,7 @@ public function stats()
/**
* Get logs statistics table.
*
* @param string|null $locale
* @param string|null $locale
*
* @return \Arcanedev\LogViewer\Tables\StatsTable
*/
Expand All @@ -240,7 +240,7 @@ public function statsTable($locale = null)
/**
* Delete the log.
*
* @param string $date
* @param string $date
*
* @return bool
*/
Expand Down Expand Up @@ -292,7 +292,7 @@ public function count()
/**
* Get entries total from all logs.
*
* @param string $level
* @param string $level
*
* @return int
*/
Expand All @@ -304,7 +304,7 @@ public function total($level = 'all')
/**
* Get logs tree.
*
* @param bool $trans
* @param bool $trans
*
* @return array
*/
Expand All @@ -316,7 +316,7 @@ public function tree($trans = false)
/**
* Get logs menu.
*
* @param bool $trans
* @param bool $trans
*
* @return array
*/
Expand Down

0 comments on commit 547ae2a

Please sign in to comment.