FlixelLogConsoleSink
View sourceinterface
org.flixelgdx.logging.FlixelLogConsoleSink
public interface FlixelLogConsoleSink
Optional sink for a single structured log line to the host console. Used on platforms where System.out is not appropriate or where ANSI colors from the default path do not render (for example, browser devtools with styled console.log).
Assign to Flixel.logConsoleSink before Flixel.initialize from the platform launcher. When set, the logger calls this instead of writing ANSI text to standard output; file logging and in-game log listeners are unchanged.
Methods
emit(FlixelLogLevel, String, String, String, String, String, String, boolean)
public void emit(FlixelLogLevel level, String tag, String message, String simpleLocation, String detailedFile, String methodLabel, String timestamp, boolean detailed)
Emits one log line. Arguments mirror the data used to build the normal console and file lines, without ANSI codes.
Parameters:
| Name | Description |
|---|---|
level | The log level. |
tag | The tag, never null but may be empty. |
message | The message body. |
simpleLocation | In simple log mode, the location prefix such as mypkg/MyClass.java:42:; when the call site is unknown, a placeholder (for example, unknown:0:). |
detailedFile | Short file/line ID used in detailed mode, such as MyClass.java:42. |
methodLabel | Method name with parentheses, for example, update(). |
timestamp | The formatted timestamp used in detailed mode. |
detailed | true if FlixelLogMode.DETAILED formatting applies; otherwise simple mode. |