- display project if defined on landing page

- delete log settings in app.php (added logging.php)
This commit is contained in:
Arno Kaimbacher 2020-05-14 20:09:21 +02:00
parent f26f3f0919
commit 7b69477712
4 changed files with 97 additions and 6 deletions

View File

@ -17,6 +17,7 @@ namespace App\Library\Xml;
use App\Models\XmlCache; use App\Models\XmlCache;
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;
use \Exception;
class XmlModel class XmlModel
{ {

View File

@ -28,7 +28,7 @@ return [
| |
*/ */
'env' => env('APP_ENV', 'debug'), 'env' => env('APP_ENV', 'production'),
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
@ -41,7 +41,7 @@ return [
| |
*/ */
'debug' => env('APP_DEBUG', true), 'debug' => env('APP_DEBUG', false),
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
@ -123,9 +123,9 @@ return [
| |
*/ */
'log' => 'single', // 'log' => 'single',
//debug, info, notice, warning, error, critical, alert, emergency. // //debug, info, notice, warning, error, critical, alert, emergency.
'log_level' => env('APP_LOG_LEVEL', 'debug'), // 'log_level' => env('APP_LOG_LEVEL', 'debug'),
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
@ -223,7 +223,7 @@ return [
'Input' => 'Illuminate\Support\Facades\Input', 'Input' => 'Illuminate\Support\Facades\Input',
// 'Inspiring' => 'Illuminate\Foundation\Inspiring', // 'Inspiring' => 'Illuminate\Foundation\Inspiring',
'Lang' => 'Illuminate\Support\Facades\Lang', 'Lang' => 'Illuminate\Support\Facades\Lang',
'Log' => 'Illuminate\Support\Facades\Log', 'Log' => Illuminate\Support\Facades\Log::class,
'Mail' => 'Illuminate\Support\Facades\Mail', 'Mail' => 'Illuminate\Support\Facades\Mail',
'Notification' => Illuminate\Support\Facades\Notification::class, 'Notification' => Illuminate\Support\Facades\Notification::class,
'Password' => 'Illuminate\Support\Facades\Password', 'Password' => 'Illuminate\Support\Facades\Password',

84
config/logging.php Normal file
View File

@ -0,0 +1,84 @@
<?php
use Monolog\Handler\StreamHandler;
//see https://blog.pusher.com/log-channels-stacks-laravel/
return [
/*
|--------------------------------------------------------------------------
| Default Log Channel
|--------------------------------------------------------------------------
|
| This option defines the default log channel that gets used when writing
| messages to the logs. The name specified in this option should match
| one of the channels defined in the "channels" configuration array.
|
*/
'default' => env('LOG_CHANNEL', 'stack'),
/*
|--------------------------------------------------------------------------
| Log Channels
|--------------------------------------------------------------------------
|
| Here you may configure the log channels for your application. Out of
| the box, Laravel uses the Monolog PHP logging library. This gives
| you a variety of powerful log handlers / formatters to utilize.
|
| Available Drivers: "single", "daily", "slack", "syslog",
| "errorlog", "monolog",
| "custom", "stack"
|
*/
'channels' => [
'stack' => [
'driver' => 'stack',
'channels' => ['single'],
'ignore_exceptions' => false,
],
////debug, info, notice, warning, error, critical, alert, emergency.
'single' => [
'driver' => 'single',
'path' => storage_path('logs/laravel.log'),
'level' => 'error',
],
'daily' => [
'driver' => 'daily',
'path' => storage_path('logs/laravel.log'),
'level' => 'debug',
'days' => 7,
],
'slack' => [
'driver' => 'slack',
'url' => env('LOG_SLACK_WEBHOOK_URL'),
'username' => 'Laravel Log',
'emoji' => ':boom:',
'level' => 'critical',
],
'stderr' => [
'driver' => 'monolog',
'handler' => StreamHandler::class,
'with' => [
'stream' => 'php://stderr',
],
],
'syslog' => [
'driver' => 'syslog',
'level' => 'debug',
],
'errorlog' => [
'driver' => 'errorlog',
'level' => 'debug',
],
],
];

View File

@ -93,6 +93,12 @@
@endforeach @endforeach
</ul> </ul>
</p> </p>
@endif
@if($dataset->project()->exists())
<p class="dataset__abstract">
Projekt: {{ $dataset->project->name }}
</p>
@endif @endif
<p class="dataset__abstract">Erstellungsjahr: {{ $dataset->server_date_published->year }}</p> <p class="dataset__abstract">Erstellungsjahr: {{ $dataset->server_date_published->year }}</p>