Internal: added an API for logging tools events

SVN:trunk[1026]
This commit is contained in:
Romain Quetiez
2010-12-10 15:19:18 +00:00
parent 203887589f
commit 21722b9e80
2 changed files with 148 additions and 120 deletions

View File

@@ -117,4 +117,30 @@ class IssueLog
self::$m_oFileLog->Ok($sText);
}
}
class ToolsLog
{
protected static $m_oFileLog;
public static function Enable($sTargetFile)
{
self::$m_oFileLog = new FileLog($sTargetFile);
}
public static function Error($sText)
{
self::$m_oFileLog->Error($sText);
}
public static function Warning($sText)
{
self::$m_oFileLog->Warning($sText);
}
public static function Info($sText)
{
self::$m_oFileLog->Info($sText);
}
public static function Ok($sText)
{
self::$m_oFileLog->Ok($sText);
}
}
?>

View File

@@ -3294,6 +3294,8 @@ abstract class MetaModel
}
self::$m_bLogNotification = self::$m_oConfig->GetLogNotification();
self::$m_bLogWebService = self::$m_oConfig->GetLogWebService();
ToolsLog::Enable(APPROOT.'/tools.log');
}
else
{