N°5993 - Add purge mechanism to log system (#447)

* N°5993 - Add purge mechanism to log system

* Update core/config.class.inc.php

Co-authored-by: Molkobain <lajarige.guillaume@free.fr>

* Update core/log.class.inc.php

Co-authored-by: Molkobain <lajarige.guillaume@free.fr>

* Update core/log.class.inc.php

Co-authored-by: Molkobain <lajarige.guillaume@free.fr>

* Update core/log.class.inc.php

Co-authored-by: Molkobain <lajarige.guillaume@free.fr>

* Update core/log.class.inc.php

Co-authored-by: Molkobain <lajarige.guillaume@free.fr>

* Namespace the log purge config parameters

---------

Co-authored-by: Molkobain <lajarige.guillaume@free.fr>
This commit is contained in:
bdalsass
2023-03-06 15:25:26 +01:00
committed by GitHub
parent 08a0c7ec88
commit baafb97bdd
2 changed files with 158 additions and 59 deletions

View File

@@ -113,70 +113,86 @@ class Config
* @since 2.7.0 export_pdf_font param
*/
protected $m_aSettings = [
'log_level_min' => [
'type' => 'array',
'description' => 'Optional min log level, per channel.',
'default' => '',
'value' => '',
'source_of_value' => '',
'log_level_min' => [
'type' => 'array',
'description' => 'Optional min log level, per channel.',
'default' => '',
'value' => '',
'source_of_value' => '',
'show_in_conf_sample' => false,
],
'log_level_min.write_in_db' => [
'type' => 'array',
'description' => 'Optional min log level IN DB, per channel.',
'default' => '',
'value' => '',
'source_of_value' => '',
'log_level_min.write_in_db' => [
'type' => 'array',
'description' => 'Optional min log level IN DB, per channel.',
'default' => '',
'value' => '',
'source_of_value' => '',
'show_in_conf_sample' => false,
],
'event_service.debug.filter_events' => [
'type' => 'array',
'description' => 'List of events name to filter Event Service debug messages',
'default' => [],
'value' => '',
'source_of_value' => '',
'log_purge.enabled' => [
'type' => 'bool',
'description' => 'Optional purge activation.',
'default' => false,
'value' => '',
'source_of_value' => '',
'show_in_conf_sample' => false,
],
'log_purge.max_keep_days' => [
'type' => 'integer',
'description' => 'Optional purge number of days to keep logs.',
'default' => 365,
'value' => '',
'source_of_value' => '',
'show_in_conf_sample' => false,
],
'event_service.debug.filter_events' => [
'type' => 'array',
'description' => 'List of events name to filter Event Service debug messages',
'default' => [],
'value' => '',
'source_of_value' => '',
'show_in_conf_sample' => false,
],
'event_service.debug.filter_sources' => [
'type' => 'array',
'description' => 'List of event sources to filter Event Service debug messages',
'default' => '',
'value' => '',
'source_of_value' => '',
'type' => 'array',
'description' => 'List of event sources to filter Event Service debug messages',
'default' => '',
'value' => '',
'source_of_value' => '',
'show_in_conf_sample' => false,
],
'app_env_label' => [
'type' => 'string',
'description' => 'Label displayed to describe the current application environment, defaults to the environment name (e.g. "production")',
'default' => '',
'value' => '',
'source_of_value' => '',
'app_env_label' => [
'type' => 'string',
'description' => 'Label displayed to describe the current application environment, defaults to the environment name (e.g. "production")',
'default' => '',
'value' => '',
'source_of_value' => '',
'show_in_conf_sample' => false,
],
'app_root_url' => [
'type' => 'string',
'description' => 'Root URL used for navigating within the application, or from an email to the application (you can put $SERVER_NAME$ as a placeholder for the server\'s name)',
'default' => '',
'value' => '',
'source_of_value' => '',
'app_root_url' => [
'type' => 'string',
'description' => 'Root URL used for navigating within the application, or from an email to the application (you can put $SERVER_NAME$ as a placeholder for the server\'s name)',
'default' => '',
'value' => '',
'source_of_value' => '',
'show_in_conf_sample' => true,
],
'app_icon_url' => [
'type' => 'string',
'description' => 'Hyperlink to redirect the user when clicking on the application icon (in the main window, or login/logoff pages)',
'default' => 'http://www.combodo.com/itop',
'value' => '',
'source_of_value' => '',
'app_icon_url' => [
'type' => 'string',
'description' => 'Hyperlink to redirect the user when clicking on the application icon (in the main window, or login/logoff pages)',
'default' => 'http://www.combodo.com/itop',
'value' => '',
'source_of_value' => '',
'show_in_conf_sample' => false,
],
'db_host' => [
'type' => 'string',
'default' => null,
'value' => '',
'source_of_value' => '',
'db_host' => [
'type' => 'string',
'default' => null,
'value' => '',
'source_of_value' => '',
'show_in_conf_sample' => true,
],
'db_user' => [
'db_user' => [
'type' => 'string',
'default' => null,
'value' => '',