ug4
|
#include <debug_id.h>
Public Member Functions | |
DebugID (const char *str) | |
registers the DebugID at DebugIDManager More... | |
DebugID (uint32 hash) | |
int | get_debug_level () const |
returns the debug level via GetDebugIDManager. More... | |
bool | set_debug_level (int level) |
sets the debug level via GetDebugIDManager. More... | |
Private Attributes | |
uint32 | m_hash |
Friends | |
class | DebugIDManager |
A DebugID is an object to control the debug level of parts of the code. It can be used in
ug4's standard DebugIDs are APP, LIB_GRID, LIB_GRID_REFINER, LIB_DISC, LIB_DISC_ASSEMBLE, LIB_DISC_D3F, LIB_DISC_MULTIGRID, LIB_DISC_NEWTON, LIB_DISC_LINKER, LIB_DISC_TRANSFER, LIB_DISC_DISCRETE_FUNCTION, LIB_DISC_OUTPUT, LIB_DISC_OPERATOR_INVERSE, LIB_ALG_LINEAR_OPERATOR, LIB_ALG_LINEAR_SOLVER, LIB_ALG_VECTOR, LIB_ALG_MATRIX, LIB_ALG_AMG, LIB_PCL
They are managed with
{.cpp}
Now to use it in other files you need to add there
{.cpp}
Note that the DebugID OBJECT is called DID_MYAPP, but its string identifier is "MyApp" (this is used in the script system). In LUA script you can do
GetLogAssistant():set_debug_level("MyApp", 3) or, with completion (UGIDE) SetDebugLevel(debugID.MyApp, 3)