mirror of https://github.com/Icinga/icinga2.git
parent
82a9a8f0cf
commit
c3cf7682b9
|
@ -23,6 +23,10 @@
|
|||
|
||||
using namespace icinga;
|
||||
|
||||
DebugInfo::DebugInfo(void)
|
||||
: FirstLine(0), FirstColumn(0), LastLine(0), LastColumn(0)
|
||||
{ }
|
||||
|
||||
/**
|
||||
* Outputs a DebugInfo struct to a stream.
|
||||
*
|
||||
|
|
|
@ -31,7 +31,7 @@ namespace icinga
|
|||
*
|
||||
* @ingroup config
|
||||
*/
|
||||
struct DebugInfo
|
||||
struct I2_BASE_API DebugInfo
|
||||
{
|
||||
String Path;
|
||||
|
||||
|
@ -41,16 +41,14 @@ struct DebugInfo
|
|||
int LastLine;
|
||||
int LastColumn;
|
||||
|
||||
DebugInfo(void)
|
||||
: FirstLine(0), FirstColumn(0), LastLine(0), LastColumn(0)
|
||||
{ }
|
||||
DebugInfo(void);
|
||||
};
|
||||
|
||||
I2_BASE_API std::ostream& operator<<(std::ostream& out, const DebugInfo& val);
|
||||
|
||||
I2_BASE_API DebugInfo DebugInfoRange(const DebugInfo& start, const DebugInfo& end);
|
||||
|
||||
I2_BASE_API void ShowCodeFragment(std::ostream& out, const DebugInfo& di, bool verbose);
|
||||
I2_BASE_API void ShowCodeFragment(std::ostream& out, const DebugInfo& di, bool verbose = true);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -144,7 +144,7 @@ static bool LoadConfigFiles(const boost::program_options::variables_map& vm, con
|
|||
|
||||
BOOST_FOREACH(const ConfigCompilerMessage& message, ConfigCompilerContext::GetInstance()->GetMessages()) {
|
||||
std::ostringstream locbuf;
|
||||
ShowCodeFragment(locbuf, message.Location, true);
|
||||
ShowCodeFragment(locbuf, message.Location);
|
||||
String location = locbuf.str();
|
||||
|
||||
String logmsg;
|
||||
|
|
Loading…
Reference in New Issue