mivita/config/logging.php
Kevin Adametz 4c944aa15d Spamschutz Kontakt + Registrierung: Turnstile, Rate-Limit, Honeypot; Passwort min. 8
- Kontaktformular: keine Mail mehr an die eingegebene Adresse (wurde als
  Spam-Versender missbraucht); Anfrage nur an Kontakt-Adresse + Berater (BCC),
  Reply-To = Absender; Eingaben in der Mail escaped
- Kontakt + Registrierung: Cloudflare Turnstile statt reCAPTCHA (Schluessel
  aus dem Code in die .env), Rate-Limits, Honeypot + Mindest-Ausfuellzeit,
  Namensregel (lateinische Schrift, max. 50 Zeichen), Form Requests
- Registrierung: Partner-Nummer nur fuer aktive Berater (vorher ungeprueft)
- CRM: POST /register abgeschaltet (legte ohne Captcha Benutzer an)
- Passwort-Mindestlaenge systemweit 8 Zeichen ueber Password::defaults()
- Log abgefangener Anfragen: storage/logs/form-spam-*.log
- Doku und Protokoll: dev/2026-10-09-spam/README.md

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 08:22:02 +00:00

152 lines
4.6 KiB
PHP
Executable file

<?php
use Monolog\Handler\StreamHandler;
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' => [
'monitoring' => [
'driver' => 'daily',
'path' => storage_path('logs/monitoring.log'),
'level' => 'debug',
'days' => 30,
],
'order_controller' => [
'driver' => 'daily',
'path' => storage_path('logs/order_controller.log'),
'level' => env('LOG_LEVEL', 'warning'),
'days' => 14,
],
'abo_order' => [
'driver' => 'daily',
'path' => storage_path('logs/abo_order.log'),
'level' => env('LOG_LEVEL', 'warning'),
'days' => 14,
],
'domain' => [
'driver' => 'daily',
'path' => storage_path('logs/domain.log'),
'level' => env('LOG_LEVEL', 'warning'),
'days' => 14,
],
'payone' => [
'driver' => 'daily',
'path' => storage_path('logs/payone.log'),
'level' => env('LOG_LEVEL', 'warning'),
'days' => 14,
],
// 'info' statt 'warning': Während der Stripe-Einführung sollen auch
// verarbeitete Webhooks nachvollziehbar sein (Rollout-Beobachtung).
'stripe' => [
'driver' => 'daily',
'path' => storage_path('logs/stripe.log'),
'level' => env('LOG_LEVEL', 'info'),
'days' => 14,
],
'cleanup' => [
'driver' => 'daily',
'path' => storage_path('logs/cleanup.log'),
'level' => env('LOG_LEVEL', 'info'),
'days' => 7,
],
'payment' => [
'driver' => 'daily',
'path' => storage_path('logs/payment.log'),
'level' => env('LOG_LEVEL', 'warning'),
'days' => 30,
],
'cron' => [
'driver' => 'daily',
'path' => storage_path('logs/cron.log'),
'level' => env('LOG_LEVEL', 'info'),
'days' => 14,
],
'dhl' => [
'driver' => 'daily',
'path' => storage_path('logs/dhl.log'),
'level' => env('LOG_LEVEL', 'info'),
'days' => 30,
],
// Abgefangene Anfragen aus Kontakt- und Registrierungsformular (ohne Freitext)
'form_spam' => [
'driver' => 'daily',
'path' => storage_path('logs/form-spam.log'),
'level' => 'info',
'days' => 30,
],
'stack' => [
'driver' => 'stack',
'channels' => ['single'],
],
'single' => [
'driver' => 'daily',
'path' => storage_path('logs/laravel.log'),
'level' => env('LOG_LEVEL', 'warning'),
'days' => 14,
],
'daily' => [
'driver' => 'daily',
'path' => storage_path('logs/laravel.log'),
'level' => env('LOG_LEVEL', 'warning'),
'days' => 14,
],
'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',
],
],
];