FlixelTeaVMLogConsole
View sourceclass
org.flixelgdx.backend.teavm.logging.FlixelTeaVMLogConsole
public final class FlixelTeaVMLogConsole
Routes FlixelLogConsoleSink output to the browser console with %c styling so log levels and locations read clearly in devtools (ANSI escapes from System.out are not used on web).
The native script also picks the right console method per level (so the browser's own filter pills for warnings and errors work as expected): console.log for DEBUG and INFO, console.warn for WARN, and console.error for ERROR.
Methods
emit(FlixelLogLevel, String, String, String, String, String, String, boolean)
public static void emit(FlixelLogLevel level, String tag, String message, String simpleLocation, String detailedFile, String methodLabel, String timestamp, boolean detailed)
Forwards one structured log to JavaScript. Matches FlixelLogConsoleSink#emit for use with Flixel.logConsoleSink = FlixelTeaVMLogConsole::emit.
Parameters:
| Name | Description |
|---|---|
level | The log level to color and route on. |
tag | The associated tag, may be empty. |
message | The body text of the log line. |
simpleLocation | The short package/File.java:line: prefix for simple mode. |
detailedFile | The detailed File.java:line string used in detailed mode. |
methodLabel | The method label such as update(). |
timestamp | The pre-formatted timestamp string. |
detailed | true to render in detailed mode (timestamp + tags + body). |