Compat: implemented log_path config getter (no functionality yet)

fixes #2796
This commit is contained in:
Michael Friedrich 2013-02-07 18:34:50 +01:00
parent 0932f00edb
commit 0de681be5d
2 changed files with 15 additions and 0 deletions

View File

@ -55,6 +55,20 @@ String CompatComponent::GetObjectsPath(void) const
return objectsPath;
}
/**
* Retrieves the log path.
*
* @returns log path
*/
String CompatComponent::GetLogPath(void) const
{
Value logPath = GetConfig()->Get("log_path");
if (logPath.IsEmpty())
return Application::GetLocalStateDir() + "/log/icinga2/compat";
else
return logPath;
}
/**
* Retrieves the icinga.cmd path.
*

View File

@ -44,6 +44,7 @@ private:
String GetStatusPath(void) const;
String GetObjectsPath(void) const;
String GetLogPath(void) const;
String GetCommandPath(void) const;
void DumpDowntimes(ofstream& fp, const DynamicObject::Ptr& owner);