// file: crates/apps/game-reflex-poc-tauri/frontend/ts/logging.ts // version: 1 import { attachConsole, debug, error, info, trace, warn } from "@fltsci/tauri-plugin-tracing"; let detachRustConsole: (() => void) | null = null; export async function initializeTracing(): Promise { detachRustConsole = await attachConsole(); await info("Reflex Tauri frontend tracing initialized", "games::tauri::reflex::frontend"); } export async function tracingTrace(message: string): Promise { await trace(message, "games::tauri::reflex::frontend"); } export async function tracingDebug(message: string): Promise { await debug(message, "games::tauri::reflex::frontend"); } export async function tracingInfo(message: string): Promise { await info(message, "games::tauri::reflex::frontend"); } export async function tracingWarn(message: string): Promise { await warn(message, "games::tauri::reflex::frontend"); } export async function tracingError(message: string): Promise { await error(message, "games::tauri::reflex::frontend"); } export function detachTracingConsole(): void { if (detachRustConsole !== null) { detachRustConsole(); detachRustConsole = null; } }