Class TraceManager
Defined in File info.h
Class Documentation
-
class TraceManager
TraceManager defines interface for debug trace management.
Public Functions
-
TraceManager() = default
Constructor of TraceManager.
-
~TraceManager() = default
Destructor of TraceManager.
Public Static Functions
-
static inline TraceContextPtr CurrentContextInfo()
Get current trace context.
- Returns
The current trace context.
-
static void DebugTrace(const std::string &func_name, const LocationPtr &location)
Debug trace with the given function name and location.
- Parameters
func_name – [in] The function name for debug trace.
location – [in] The source code location for debug trace.
-
static void DebugTrace(const LocationPtr &location)
Debug trace with the given location.
- Parameters
location – [in] The source code location for debug trace.
-
static void DebugTrace(const TraceInfoPtr &trace_info)
Debug trace with the given trace info.
- Parameters
trace_info – [in] The trace info for debug.
-
static void DebugTrace(const DebugInfoPtr &debug_info, const TraceInfoPtr &trace_info)
Debug trace with a cloned trace info and debug info.
- Parameters
debug_info – [in] The debug info for debug trace.
trace_info – [in] The trace info for debug trace.
-
static inline void EndTrace() noexcept
End current debug trace.
-
static void ClearParseOrResolveDebugInfo()
Clear debug info for parse or resolve.
-
static DebugInfoPtr record_debug_info()
Get debug info for parse or resolve.
- Returns
The debug info for parse or resolve.
-
static bool record_debug_info_flag()
Get the flag of recording a debug info.
- Returns
A bool.
-
static void CloseRecordDebugInfoFlag()
Set the flag to false for not recording a debug info.
-
static void OpenRecordDebugInfoFlag()
Set the flag to true for recording a debug info.
-
TraceManager() = default