mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-25 11:38:44 +02:00
Internal: added an API for logging tools events
SVN:trunk[1026]
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user