N°2031 backup : now logs using IssueLog, and remove debug config property

This commit is contained in:
Pierre Goiffon
2019-02-19 14:46:44 +01:00
parent 02617e8976
commit 23ec21e494
2 changed files with 3 additions and 21 deletions

View File

@@ -47,31 +47,14 @@ class DBBackupScheduled extends DBBackup
{
protected function LogInfo($sMsg)
{
static $bDebug = null;
if ($bDebug == null)
{
$bDebug = MetaModel::GetConfig()->GetModuleSetting('itop-backup', 'debug', false);
}
if ($bDebug)
{
echo $sMsg."\n";
}
echo $sMsg."\n";
IssueLog::Info($sMsg);
}
protected function LogError($sMsg)
{
static $bDebug = null;
if ($bDebug == null)
{
$bDebug = MetaModel::GetConfig()->GetModuleSetting('itop-backup', 'debug', false);
}
IssueLog::Error($sMsg);
if ($bDebug)
{
echo 'Error: '.$sMsg."\n";
}
echo 'Error: '.$sMsg."\n";
}
/**

View File

@@ -52,7 +52,6 @@ SetupWebPage::AddModule(
//'file_name_format' => '__DB__-%Y-%m-%d_%H_%M',
'retention_count' => 5,
'enabled' => true,
'debug' => false,
'itop_root' => '',
),
)