1 /* Icinga 2 | (c) 2012 Icinga GmbH | GPLv2+ */
6 #include "base/i2-base.hpp"
7 #include "base/string.hpp"
18 void Print(std::ostream& fp) const;
20 size_t GetLength() const;
23 std::list<String> m_Frames;
26 std::ostream& operator<<(std::ostream& stream, const ContextTrace& trace);
36 ContextFrame(const String& message);
40 static std::list<String>& GetFrames();
42 friend class ContextTrace;
45 /* The currentContextFrame variable has to be volatile in order to prevent
46 * the compiler from optimizing it away. */
47 #define CONTEXT(message) volatile icinga::ContextFrame currentContextFrame(message)
50 #endif /* CONTEXT_H */