MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / Log

Method Log

Source/Engine/Platform/Web/WebPlatform.cpp:251–269  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

249}
250
251void WebPlatform::Log(const StringView& msg, int32 logType)
252{
253 const StringAsANSI<512> msgAnsi(*msg, msg.Length());
254
255 // Fix % characters that should not be formatted
256 auto buffer = (char*)msgAnsi.Get();
257 for (int32 i = 0; buffer[i]; i++)
258 {
259 if (buffer[i] == '%')
260 buffer[i] = 'p';
261 }
262
263 int flags = EM_LOG_CONSOLE;
264 if (logType == (int32)LogType::Warning)
265 flags |= EM_LOG_WARN;
266 if (logType == (int32)LogType::Error)
267 flags |= EM_LOG_ERROR;
268 emscripten_log(flags, buffer);
269}
270
271String WebPlatform::GetComputerName()
272{

Callers

nothing calls this directly

Calls 2

LengthMethod · 0.45
GetMethod · 0.45

Tested by

no test coverage detected