MCPcopy Create free account
hub / github.com/TombEngine/TombEngine / TENLog

Function TENLog

TombEngine/Game/debug/debug.cpp:90–124  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

88 }
89
90 void TENLog(const std::string_view& msg, LogLevel level, LogConfig config, bool allowSpam)
91 {
92 if (prevString == msg && !allowSpam)
93 return;
94
95 if constexpr (!DEBUG_BUILD)
96 {
97 if (config == LogConfig::Debug)
98 return;
99 }
100
101 auto logger = spdlog::get("multi_sink");
102
103 if (!logger)
104 return;
105
106 switch (level)
107 {
108 case LogLevel::Error:
109 logger->error(msg);
110 break;
111
112 case LogLevel::Warning:
113 logger->warn(msg);
114 break;
115
116 case LogLevel::Info:
117 logger->info(msg);
118 break;
119 }
120
121 logger->flush();
122
123 prevString = std::string(msg);
124 }
125
126 void StartDebugTimer()
127 {

Callers 15

throwIfFailedFunction · 0.85
AddStringMethod · 0.85
RenderShadowMapMethod · 0.85
DrawHairSortedMethod · 0.85
SetupAnimatedTexturesMethod · 0.85
UpdateAnimationMethod · 0.85
UpdateItemAnimationsMethod · 0.85
ReloadShadersMethod · 0.85
PrepareParticlesMethod · 0.85
GetVisibleRoomsMethod · 0.85
SetTextureOrDefaultMethod · 0.85

Calls 3

getFunction · 0.85
errorMethod · 0.45
flushMethod · 0.45

Tested by 3

TestGlobalTimeIntervalFunction · 0.68
TestVolumeContainmentFunction · 0.68
TestTriggersFunction · 0.68