| 9 | import org.teavm.interop.Export; |
| 10 | |
| 11 | public final class Log { |
| 12 | private Log() {} |
| 13 | |
| 14 | @Import(name = "trace", module = "log") |
| 15 | private static native void wasmImportTrace(int p0, int p1); |
| 16 | |
| 17 | public static void trace(String s) { |
| 18 | byte[] bytes = (s).getBytes(StandardCharsets.UTF_8); |
| 19 | wasmImportTrace(Address.ofData(bytes).toInt(), bytes.length); |
| 20 | |
| 21 | } |
| 22 | @Import(name = "debug", module = "log") |
| 23 | private static native void wasmImportDebug(int p0, int p1); |
| 24 | |
| 25 | public static void debug(String s) { |
| 26 | byte[] bytes = (s).getBytes(StandardCharsets.UTF_8); |
| 27 | wasmImportDebug(Address.ofData(bytes).toInt(), bytes.length); |
| 28 | |
| 29 | } |
| 30 | @Import(name = "info", module = "log") |
| 31 | private static native void wasmImportInfo(int p0, int p1); |
| 32 | |
| 33 | public static void info(String s) { |
| 34 | byte[] bytes = (s).getBytes(StandardCharsets.UTF_8); |
| 35 | wasmImportInfo(Address.ofData(bytes).toInt(), bytes.length); |
| 36 | |
| 37 | } |
| 38 | @Import(name = "warn", module = "log") |
| 39 | private static native void wasmImportWarn(int p0, int p1); |
| 40 | |
| 41 | public static void warn(String s) { |
| 42 | byte[] bytes = (s).getBytes(StandardCharsets.UTF_8); |
| 43 | wasmImportWarn(Address.ofData(bytes).toInt(), bytes.length); |
| 44 | |
| 45 | } |
| 46 | @Import(name = "error", module = "log") |
| 47 | private static native void wasmImportError(int p0, int p1); |
| 48 | |
| 49 | public static void error(String s) { |
| 50 | byte[] bytes = (s).getBytes(StandardCharsets.UTF_8); |
| 51 | wasmImportError(Address.ofData(bytes).toInt(), bytes.length); |
| 52 | |
| 53 | } |
| 54 | |
| 55 | } |
| 56 |
nothing calls this directly
no outgoing calls
no test coverage detected