mirror of https://github.com/Icinga/icinga2.git
parent
4452711b1d
commit
4896428c06
|
@ -140,6 +140,13 @@ void ObjectListCommand::PrintObject(std::ostream& fp, bool& first, const String&
|
|||
fp << "Object '" << ConsoleColorTag(Console_ForegroundBlue | Console_Bold) << internal_name << ConsoleColorTag(Console_Normal) << "'";
|
||||
fp << " of type '" << ConsoleColorTag(Console_ForegroundMagenta | Console_Bold) << type << ConsoleColorTag(Console_Normal) << "':\n";
|
||||
|
||||
Array::Ptr di = object->Get("debug_info");
|
||||
|
||||
if (di) {
|
||||
fp << ConsoleColorTag(Console_ForegroundCyan) << " % declared in '" << di->Get(0) << "', lines "
|
||||
<< di->Get(1) << ":" << di->Get(2) << "-" << di->Get(3) << ":" << di->Get(4) << ConsoleColorTag(Console_Normal) << "\n";
|
||||
}
|
||||
|
||||
PrintProperties(fp, properties, debug_hints, 2);
|
||||
|
||||
type_count[type]++;
|
||||
|
|
|
@ -214,6 +214,14 @@ DynamicObject::Ptr ConfigItem::Commit(bool discard)
|
|||
persistentItem->Set("properties", attrs);
|
||||
persistentItem->Set("debug_hints", debugHints.ToDictionary());
|
||||
|
||||
Array::Ptr di = new Array();
|
||||
di->Add(m_DebugInfo.Path);
|
||||
di->Add(m_DebugInfo.FirstLine);
|
||||
di->Add(m_DebugInfo.FirstColumn);
|
||||
di->Add(m_DebugInfo.LastLine);
|
||||
di->Add(m_DebugInfo.LastColumn);
|
||||
persistentItem->Set("debug_info", di);
|
||||
|
||||
ConfigCompilerContext::GetInstance()->WriteObject(persistentItem);
|
||||
persistentItem.reset();
|
||||
|
||||
|
|
Loading…
Reference in New Issue