Actualizacion automatica: 2024-05-01 20:46:56

This commit is contained in:
imnavajas
2024-05-01 20:52:15 +02:00
parent 0c4888f9b3
commit 94446e4a79
26 changed files with 585 additions and 315 deletions

View File

@ -3,6 +3,7 @@
namespace Config;
use CodeIgniter\Config\BaseConfig;
use CodeIgniter\Log\Handlers\FileHandler;
class Logger extends BaseConfig
{
@ -37,7 +38,7 @@ class Logger extends BaseConfig
*
* @var array|int
*/
public $threshold = 4;
public $threshold = (ENVIRONMENT === 'production') ? 4 : 9;
/**
* --------------------------------------------------------------------------
@ -46,10 +47,8 @@ class Logger extends BaseConfig
*
* Each item that is logged has an associated date. You can use PHP date
* codes to set your own date formatting
*
* @var string
*/
public $dateFormat = 'Y-m-d H:i:s';
public string $dateFormat = 'Y-m-d H:i:s';
/**
* --------------------------------------------------------------------------
@ -73,18 +72,14 @@ class Logger extends BaseConfig
*
* Handlers are executed in the order defined in this array, starting with
* the handler on top and continuing down.
*
* @var array
*/
public $handlers = [
public array $handlers = [
/*
* --------------------------------------------------------------------
* File Handler
* --------------------------------------------------------------------
*/
'CodeIgniter\Log\Handlers\FileHandler' => [
FileHandler::class => [
// The log levels that this handler will handle.
'handles' => [
'critical',
@ -102,7 +97,7 @@ class Logger extends BaseConfig
* An extension of 'php' allows for protecting the log files via basic
* scripting, when they are to be stored under a publicly accessible directory.
*
* Note: Leaving it blank will default to 'log'.
* NOTE: Leaving it blank will default to 'log'.
*/
'fileExtension' => '',
@ -140,14 +135,14 @@ class Logger extends BaseConfig
* Uncomment this block to use it.
*/
// 'CodeIgniter\Log\Handlers\ErrorlogHandler' => [
// /* The log levels this handler can handle. */
// 'handles' => ['critical', 'alert', 'emergency', 'debug', 'error', 'info', 'notice', 'warning'],
// /* The log levels this handler can handle. */
// 'handles' => ['critical', 'alert', 'emergency', 'debug', 'error', 'info', 'notice', 'warning'],
//
// /*
// * The message type where the error should go. Can be 0 or 4, or use the
// * class constants: `ErrorlogHandler::TYPE_OS` (0) or `ErrorlogHandler::TYPE_SAPI` (4)
// */
// 'messageType' => 0,
// /*
// * The message type where the error should go. Can be 0 or 4, or use the
// * class constants: `ErrorlogHandler::TYPE_OS` (0) or `ErrorlogHandler::TYPE_SAPI` (4)
// */
// 'messageType' => 0,
// ],
];
}