MCPcopy Create free account
hub / github.com/WolfireGames/overgrowth / ASLog

Function ASLog

Source/Scripting/angelscript/asfuncs.cpp:5965–5976  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5963}
5964
5965static void ASLog(LogSystem::LogType level, const std::string& str) {
5966 if (active_context_stack.size() > 0) {
5967 std::pair<Path, int> d = active_context_stack.top()->GetCallFile();
5968
5969 if (memcmp(d.first.GetOriginalPath(), "Data/Scripts/", 13) == 0)
5970 LogSystem::LogData(level, "us", d.first.GetOriginalPath() + 13, d.second) << str << std::endl;
5971 else
5972 LogSystem::LogData(level, "us", d.first.GetOriginalPath(), d.second) << str << std::endl;
5973 } else {
5974 LogSystem::LogData(level, "us", "NO_CONTEXT", 0) << str << std::endl;
5975 }
5976}
5977
5978void AttachLog(ASContext* context) {
5979 context->RegisterEnum("LogType");

Callers

nothing calls this directly

Calls 5

LogDataClass · 0.85
GetCallFileMethod · 0.80
topMethod · 0.80
GetOriginalPathMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected