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

Updating the package #144

Merged
merged 1 commit into from
May 29, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
/vendor/
composer.phar
composer.lock
phpunit.xml
.DS_Store
Thumbs.db
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ env:

before_script:
- travis_retry composer self-update
- travis_retry composer require --prefer-source --no-interaction --dev "orchestra/testbench-browser-kit:${TESTBENCH_VERSION}" "orchestra/database:${TESTBENCH_VERSION}"
- travis_retry composer require --prefer-source --no-interaction --dev "orchestra/testbench-browser-kit:${TESTBENCH_VERSION}"

script:
- composer validate
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2015 ARCANEDEV <arcanedev.maroc@gmail.com> - LogViewer
Copyright (c) 2015-2017 ARCANEDEV <arcanedev.maroc@gmail.com> - LogViewer

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ Feel free to check out the [releases](https://github.com/ARCANEDEV/LogViewer/rel
| `fr` | French |
| `hu` | Hungarian |
| `hy` | Armenian |
| `id` | Indonesian |
| `it` | Italian |
| `ko` | Korean |
| `nl` | Dutch |
Expand Down Expand Up @@ -90,7 +91,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/For-Laravel%205.x-orange.svg?style=flat-square
[badge_laravel]: https://img.shields.io/badge/Laravel-5.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/2.Configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ return [
| Locale
| ------------------------------------------------------------------------------------------------
| Supported locales :
| 'auto', 'ar', 'bg', 'de', 'en', 'es', 'et', 'fa', 'fr', 'hu', 'hy', 'it', 'ko', 'nl', 'pl',
| 'pt-BR', 'ro', 'ru', 'sv', 'th', 'tr', 'zh-TW', 'zh'
| 'auto', 'ar', 'bg', 'de', 'en', 'es', 'et', 'fa', 'fr', 'hu', 'hy', 'id', 'it', 'ko', 'nl',
| 'pl', 'pt-BR', 'ro', 'ru', 'sv', 'th', 'tr', 'zh-TW', 'zh'
*/
'locale' => 'auto',

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
}
},
"scripts": {
"testbench": "composer require --dev \"orchestra/testbench-browser-kit=~3.4\" \"orchestra/database=~3.4\""
"testbench": "composer require --dev \"orchestra/testbench-browser-kit=~3.4\""
},
"extra": {
"branch-alias": {
Expand Down
65 changes: 39 additions & 26 deletions config/log-viewer.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,35 +3,40 @@
use Arcanedev\LogViewer\Contracts\Utilities\Filesystem;

return [
/* ------------------------------------------------------------------------------------------------

/* -----------------------------------------------------------------
| Log files storage path
| ------------------------------------------------------------------------------------------------
| -----------------------------------------------------------------
*/

'storage-path' => storage_path('logs'),

/* ------------------------------------------------------------------------------------------------
/* -----------------------------------------------------------------
| Log files pattern
| ------------------------------------------------------------------------------------------------
| -----------------------------------------------------------------
*/

'pattern' => [
'prefix' => Filesystem::PATTERN_PREFIX, // 'laravel-'
'date' => Filesystem::PATTERN_DATE, // '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]'
'extension' => Filesystem::PATTERN_EXTENSION, // '.log'
],

/* ------------------------------------------------------------------------------------------------
/* -----------------------------------------------------------------
| Locale
| ------------------------------------------------------------------------------------------------
| -----------------------------------------------------------------
| Supported locales :
| 'auto', 'ar', 'bg', 'de', 'en', 'es', 'et', 'fa', 'fr', 'hu', 'hy', 'it', 'ko', 'nl', 'pl',
| 'pt-BR', 'ro', 'ru', 'sv', 'th', 'tr', 'zh-TW', 'zh'
| 'auto', 'ar', 'bg', 'de', 'en', 'es', 'et', 'fa', 'fr', 'hu', 'hy', 'id', 'it', 'ko', 'nl',
| 'pl', 'pt-BR', 'ro', 'ru', 'sv', 'th', 'tr', 'zh-TW', 'zh'
*/

'locale' => 'auto',

/* ------------------------------------------------------------------------------------------------
/* -----------------------------------------------------------------
| Route settings
| ------------------------------------------------------------------------------------------------
| -----------------------------------------------------------------
*/

'route' => [
'enabled' => true,

Expand All @@ -42,43 +47,48 @@
],
],

/* ------------------------------------------------------------------------------------------------
/* -----------------------------------------------------------------
| Log entries per page
| ------------------------------------------------------------------------------------------------
| -----------------------------------------------------------------
| This defines how many log entries are displayed per page.
*/

'per-page' => 30,

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

'facade' => 'LogViewer',

/* ------------------------------------------------------------------------------------------------
/* -----------------------------------------------------------------
| Download settings
| ------------------------------------------------------------------------------------------------
| -----------------------------------------------------------------
*/

'download' => [
'prefix' => 'laravel-',

'extension' => 'log',
],

/* ------------------------------------------------------------------------------------------------
/* -----------------------------------------------------------------
| Menu settings
| ------------------------------------------------------------------------------------------------
| -----------------------------------------------------------------
*/

'menu' => [
'filter-route' => 'log-viewer::logs.filter',

'icons-enabled' => true,
],

/* ------------------------------------------------------------------------------------------------
/* -----------------------------------------------------------------
| Icons
| ------------------------------------------------------------------------------------------------
| -----------------------------------------------------------------
*/

'icons' => [
/**
* Font awesome >= 4.3
Expand All @@ -95,10 +105,11 @@
'debug' => 'fa fa-fw fa-life-ring', // http://fontawesome.io/icon/life-ring/
],

/* ------------------------------------------------------------------------------------------------
/* -----------------------------------------------------------------
| Colors
| ------------------------------------------------------------------------------------------------
| -----------------------------------------------------------------
*/

'colors' => [
'levels' => [
'empty' => '#D1D1D1',
Expand All @@ -114,12 +125,14 @@
],
],

/* ------------------------------------------------------------------------------------------------
/* -----------------------------------------------------------------
| Strings to highlight in stack trace
| ------------------------------------------------------------------------------------------------
| -----------------------------------------------------------------
*/

'highlight' => [
'^#\d+',
'^Stack trace:',
'^#\d+',
'^Stack trace:',
],

];
File renamed without changes.
24 changes: 14 additions & 10 deletions src/Commands/CheckCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@
*/
class CheckCommand extends Command
{
/* ------------------------------------------------------------------------------------------------
/* -----------------------------------------------------------------
| Properties
| ------------------------------------------------------------------------------------------------
| -----------------------------------------------------------------
*/

/**
* The console command name.
*
Expand All @@ -35,10 +36,11 @@ class CheckCommand extends Command
*/
protected $signature = 'log-viewer:check';

/* ------------------------------------------------------------------------------------------------
/* -----------------------------------------------------------------
| Getter & Setters
| ------------------------------------------------------------------------------------------------
| -----------------------------------------------------------------
*/

/**
* Get the Log Checker instance.
*
Expand All @@ -49,10 +51,11 @@ protected function getChecker()
return $this->laravel[LogCheckerContract::class];
}

/* ------------------------------------------------------------------------------------------------
| Main Functions
| ------------------------------------------------------------------------------------------------
/* -----------------------------------------------------------------
| Main Methods
| -----------------------------------------------------------------
*/

/**
* Execute the console command.
*/
Expand All @@ -63,10 +66,11 @@ public function handle()
$this->displayMessages();
}

/* ------------------------------------------------------------------------------------------------
| Other Functions
| ------------------------------------------------------------------------------------------------
/* -----------------------------------------------------------------
| Other Methods
| -----------------------------------------------------------------
*/

/**
* Display LogViewer requirements.
*/
Expand Down
17 changes: 10 additions & 7 deletions src/Commands/Command.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,19 @@
*/
abstract class Command extends BaseCommand
{
/* ------------------------------------------------------------------------------------------------
/* -----------------------------------------------------------------
| Properties
| ------------------------------------------------------------------------------------------------
| -----------------------------------------------------------------
*/

/** @var \Arcanedev\LogViewer\Contracts\LogViewer */
protected $logViewer;

/* ------------------------------------------------------------------------------------------------
/* -----------------------------------------------------------------
| Constructor
| ------------------------------------------------------------------------------------------------
| -----------------------------------------------------------------
*/

/**
* Create the command instance.
*
Expand All @@ -34,10 +36,11 @@ public function __construct(LogViewerContract $logViewer)
$this->logViewer = $logViewer;
}

/* ------------------------------------------------------------------------------------------------
| Other Functions
| ------------------------------------------------------------------------------------------------
/* -----------------------------------------------------------------
| Other Methods
| -----------------------------------------------------------------
*/

/**
* Display LogViewer Logo and Copyrights.
*/
Expand Down
15 changes: 9 additions & 6 deletions src/Commands/PublishCommand.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?php namespace Arcanedev\LogViewer\Commands;

use Arcanedev\LogViewer\LogViewerServiceProvider;
use Symfony\Component\Console\Input\InputOption;

/**
Expand All @@ -10,10 +11,11 @@
*/
class PublishCommand extends Command
{
/* ------------------------------------------------------------------------------------------------
/* -----------------------------------------------------------------
| Properties
| ------------------------------------------------------------------------------------------------
| -----------------------------------------------------------------
*/

/**
* The console command name.
*
Expand All @@ -37,17 +39,18 @@ class PublishCommand extends Command
{--tag= : One or many tags that have assets you want to publish.}
{--force : Overwrite any existing files.}';

/* ------------------------------------------------------------------------------------------------
| Main Functions
| ------------------------------------------------------------------------------------------------
/* -----------------------------------------------------------------
| Main Methods
| -----------------------------------------------------------------
*/

/**
* Execute the console command.
*/
public function handle()
{
$args = [
'--provider' => \Arcanedev\LogViewer\LogViewerServiceProvider::class
'--provider' => LogViewerServiceProvider::class,
];

if ((bool) $this->option('force')) {
Expand Down
21 changes: 12 additions & 9 deletions src/Commands/StatsCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@
*/
class StatsCommand extends Command
{
/* ------------------------------------------------------------------------------------------------
/* -----------------------------------------------------------------
| Properties
| ------------------------------------------------------------------------------------------------
| -----------------------------------------------------------------
*/

/**
* The console command name.
*
Expand All @@ -35,10 +36,11 @@ class StatsCommand extends Command
*/
protected $signature = 'log-viewer:stats';

/* ------------------------------------------------------------------------------------------------
| Main Functions
| ------------------------------------------------------------------------------------------------
/* -----------------------------------------------------------------
| Main Methods
| -----------------------------------------------------------------
*/

/**
* Execute the console command.
*/
Expand All @@ -56,10 +58,11 @@ public function handle()
$this->table($stats->header(), $rows);
}

/* ------------------------------------------------------------------------------------------------
| Other Functions
| ------------------------------------------------------------------------------------------------
/* -----------------------------------------------------------------
| Other Methods
| -----------------------------------------------------------------
*/

/**
* Prepare footer.
*
Expand All @@ -70,7 +73,7 @@ public function handle()
private function prepareFooter(StatsTable $stats)
{
$files = [
'count' => count($stats->rows()) . ' log file(s)'
'count' => count($stats->rows()).' log file(s)'
];

return $files + $stats->footer();
Expand Down