-
This commit is contained in:
parent
c840951ac3
commit
aab36c2434
@ -318,14 +318,14 @@
|
|||||||
<path value="$PROJECT_DIR$/code-New/vendor/erlandmuchasaj/laravel-file-uploader" />
|
<path value="$PROJECT_DIR$/code-New/vendor/erlandmuchasaj/laravel-file-uploader" />
|
||||||
</include_path>
|
</include_path>
|
||||||
</component>
|
</component>
|
||||||
<component name="PhpProjectSharedConfiguration" php_language_level="7.2" />
|
<component name="PhpProjectSharedConfiguration" php_language_level="8.0" />
|
||||||
<component name="PhpStanOptionsConfiguration">
|
<component name="PhpStanOptionsConfiguration">
|
||||||
<option name="transferred" value="true" />
|
<option name="transferred" value="true" />
|
||||||
</component>
|
</component>
|
||||||
<component name="PhpUnit">
|
<component name="PhpUnit">
|
||||||
<phpunit_settings>
|
<phpunit_settings>
|
||||||
<PhpUnitSettings configuration_file_path="$PROJECT_DIR$/code-New/phpunit.xml" custom_loader_path="$PROJECT_DIR$/code-New/vendor/autoload.php" use_configuration_file="true" />
|
<PhpUnitSettings configuration_file_path="$PROJECT_DIR$/code-New/phpunit.xml" custom_loader_path="$PROJECT_DIR$/code-New/vendor/autoload.php" use_configuration_file="true" />
|
||||||
<PhpUnitSettings custom_loader_path="$PROJECT_DIR$/app/vendor/autoload.php" />
|
<PhpUnitSettings configuration_file_path="$PROJECT_DIR$/code/phpunit.xml" custom_loader_path="$PROJECT_DIR$/code/vendor/autoload.php" use_configuration_file="true" />
|
||||||
</phpunit_settings>
|
</phpunit_settings>
|
||||||
</component>
|
</component>
|
||||||
<component name="PsalmOptionsConfiguration">
|
<component name="PsalmOptionsConfiguration">
|
||||||
|
|||||||
@ -4,10 +4,10 @@
|
|||||||
<option name="directories">
|
<option name="directories">
|
||||||
<list>
|
<list>
|
||||||
<option value="$PROJECT_DIR$/app/tests" />
|
<option value="$PROJECT_DIR$/app/tests" />
|
||||||
<option value="$PROJECT_DIR$/code/tests/Unit" />
|
|
||||||
<option value="$PROJECT_DIR$/code/tests/Feature" />
|
|
||||||
<option value="$PROJECT_DIR$/code-New/tests/Unit" />
|
<option value="$PROJECT_DIR$/code-New/tests/Unit" />
|
||||||
<option value="$PROJECT_DIR$/code-New/tests/Feature" />
|
<option value="$PROJECT_DIR$/code-New/tests/Feature" />
|
||||||
|
<option value="$PROJECT_DIR$/code/tests/Unit" />
|
||||||
|
<option value="$PROJECT_DIR$/code/tests/Feature" />
|
||||||
</list>
|
</list>
|
||||||
</option>
|
</option>
|
||||||
</component>
|
</component>
|
||||||
|
|||||||
@ -26,18 +26,6 @@ class AppServiceProvider extends ServiceProvider
|
|||||||
*/
|
*/
|
||||||
public function boot()
|
public function boot()
|
||||||
{
|
{
|
||||||
if(config('app.env') === 'production') {
|
LogViewer::extend('synology', SynologySSLog::class);
|
||||||
//\URL::forceScheme('https');
|
|
||||||
}else {
|
|
||||||
//\URL::forceScheme('https');
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
LogViewer::auth(function ($request) {
|
|
||||||
return $request->user()
|
|
||||||
&& $request->user()->email == 'splin94@yandex.ru';
|
|
||||||
});
|
|
||||||
*/
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
44
code/app/Providers/SynologySSLog.php
Executable file
44
code/app/Providers/SynologySSLog.php
Executable file
@ -0,0 +1,44 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Providers;
|
||||||
|
|
||||||
|
use Illuminate\Support\Carbon;
|
||||||
|
use Illuminate\Support\Str;
|
||||||
|
use Opcodes\LogViewer\Facades\LogViewer;
|
||||||
|
use Opcodes\LogViewer\LogLevels\LaravelLogLevel;
|
||||||
|
use Opcodes\LogViewer\Logs\Log;
|
||||||
|
use Opcodes\LogViewer\Utils\Utils;
|
||||||
|
use Opcodes\MailParser\Message;
|
||||||
|
|
||||||
|
class SynologySSLog extends Log
|
||||||
|
{
|
||||||
|
public static string $name = 'SynologySS';
|
||||||
|
//public static string $regex = '/^\[(?P<datetime>[^\]]+)\] (?P<environment>\S+)\.(?P<level>\S+): ?(\|(?<pid>\S+)\|)? (?P<message>.*)? (\{(?<data>\S+)\}) ?(\[(?<extra>\S+|)\])?/';
|
||||||
|
public static string $regex = '/^\[(?P<datetime>[^\]]+)\] (?P<environment>\S+)\.(?P<level>\S+): ?(\|(?<pid>\S+)\|)? (?P<message>.*)? ((?<data>(\{\S+\})|(\[\]))) ((?<extra>(\{\S+\})|(\[\])))/';
|
||||||
|
|
||||||
|
/** @var array|\string[][] The columns displayed on the frontend, and which data they should display */
|
||||||
|
public static array $columns = [
|
||||||
|
['label' => 'Datetime', 'data_path' => 'datetime'],
|
||||||
|
['label' => 'Level', 'data_path' => 'level'],
|
||||||
|
['label' => 'Pid', 'data_path' => 'context.pid'],
|
||||||
|
['label' => 'Message', 'data_path' => 'context.message'],
|
||||||
|
['label' => 'Data', 'data_path' => 'context.data'],
|
||||||
|
];
|
||||||
|
|
||||||
|
public function fillMatches(array $matches = []): void
|
||||||
|
{
|
||||||
|
// The parent class already handles the "datetime", "level" and "message" matches. But you're free to assign them yourself.
|
||||||
|
parent::fillMatches($matches);
|
||||||
|
|
||||||
|
$this->context = [
|
||||||
|
'datetime' => $matches['datetime'],
|
||||||
|
'environment' => $matches['environment'],
|
||||||
|
'level' => $matches['level'],
|
||||||
|
'pid' => $matches['pid'],
|
||||||
|
'message' => $matches['message'],
|
||||||
|
'data' => $matches['data'],
|
||||||
|
'extra' => $matches['extra'],
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -8,7 +8,7 @@
|
|||||||
],
|
],
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"require": {
|
"require": {
|
||||||
"php": "^7.2.5|^8.0",
|
"php": "^8.0",
|
||||||
"erlandmuchasaj/laravel-file-uploader": "^1.0",
|
"erlandmuchasaj/laravel-file-uploader": "^1.0",
|
||||||
"faisal50x/query-filter": "^1.0",
|
"faisal50x/query-filter": "^1.0",
|
||||||
"fruitcake/laravel-cors": "dev-develop",
|
"fruitcake/laravel-cors": "dev-develop",
|
||||||
|
|||||||
@ -131,7 +131,8 @@ return [
|
|||||||
|
|
||||||
'include_files' => [
|
'include_files' => [
|
||||||
#'/var/www/storage/SynologySStoTelegram/**/*.log'
|
#'/var/www/storage/SynologySStoTelegram/**/*.log'
|
||||||
'/var/www/storage/*/*.log'
|
'/var/www/storage/*/*.log',
|
||||||
|
'/var/www/storage/synology/*.log'
|
||||||
],
|
],
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
Binary file not shown.
Loading…
Reference in New Issue
Block a user