PHP code example of alexandresafarpaim / penta-logger
1. Go to this page and download the library: Download alexandresafarpaim/penta-logger library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
alexandresafarpaim / penta-logger example snippets
// config/penta-logger.php
return [
// Habilitar/desabilitar o pacote
'enabled' => env('PENTA_LOGGER_ENABLED', true),
// Autenticação do dashboard
'auth' => [
'user' => env('PENTA_LOGGER_USER'),
'password' => env('PENTA_LOGGER_PASSWORD'),
],
// Prefixo da URL do dashboard
'route_prefix' => '_penta-logger',
// Middleware das rotas
'middleware' => ['web'],
// Máximo de logs por tipo (use 0 para desabilitar um tipo)
'max_logs' => [
'request' => env('PENTA_LOGGER_MAX_REQUESTS', 500),
'error' => env('PENTA_LOGGER_MAX_ERRORS', 500),
'external_api' => env('PENTA_LOGGER_MAX_EXTERNAL_API', 500),
'job' => env('PENTA_LOGGER_MAX_JOBS', 500),
'schedule' => env('PENTA_LOGGER_MAX_SCHEDULES', 500),
],
// Habilitar em produção (requer autenticação)
'allow_production' => false,
// Paths a ignorar (suporta wildcards)
'ignore_paths' => [
'_penta-logger/*',
'telescope/*',
'horizon/*',
],
// Headers a mascarar
'mask_headers' => [
'Authorization',
'Cookie',
'X-API-Key',
],
// Campos a mascarar (correspondência parcial)
'mask_fields' => [
'password',
'credit_card',
'cvv',
'token',
'secret',
],
];