mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 07:24:13 +01:00
N°2031 backup : now logs using IssueLog, and remove debug config property
This commit is contained in:
@@ -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";
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -52,7 +52,6 @@ SetupWebPage::AddModule(
|
||||
//'file_name_format' => '__DB__-%Y-%m-%d_%H_%M',
|
||||
'retention_count' => 5,
|
||||
'enabled' => true,
|
||||
'debug' => false,
|
||||
'itop_root' => '',
|
||||
),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user