Get the hzLogger pointer for the current thread. This is achieved by finding the hzProcess instance associated with the current thread and from there, the hzLogger. If there is no hzLogger for the current thread this function will return the hzLogger from the main thread of the program (if any). Arguments: None Pointer to the logger of the current thread NULL if no logger is in force
| Return Type | Function name | Arguments |
|---|---|---|
| hzLogger* | GetThreadLogger | (void) |
Declared in file: hzProcess.h
Defined in file : hzProcess.cpp
Function Logic:
Function body:
hzLogger* GetThreadLogger (void)
{
// Category: Diagnostics
//
// Get the hzLogger pointer for the current thread. This is achieved by finding the hzProcess instance associated with the current
// thread and from there, the hzLogger. If there is no hzLogger for the current thread this function will return the hzLogger from
// the main thread of the program (if any).
//
// Arguments: None
//
// Returns: Pointer to the logger of the current thread
// NULL if no logger is in force
hzProcess* phz ; // Current thread
phz = GetThreadInfo() ;
return phz ? phz->GetLog() : s_pDfltLog ;
}