Create standalone browser port of LTX Athena with authenticated native API transport

This commit is contained in:
Mikei386 committed 2026-09-29 17:59:23 +02:00
commit 1333b0c36b
202 files changed
+63054

No files matched your search

+13
View File
@@ -0,0 +1,13 @@
type LogLevel = 'INFO' | 'WARNING' | 'ERROR' | 'DEBUG'
function log(level: LogLevel, consoleMethod: 'log' | 'warn' | 'error', message: string): void {
console[consoleMethod](message)
window.electronAPI?.writeLog?.({ level, message })?.catch(() => {})
}
export const logger = {
info: (message: string) => log('INFO', 'log', message),
warn: (message: string) => log('WARNING', 'warn', message),
error: (message: string) => log('ERROR', 'error', message),
debug: (message: string) => log('DEBUG', 'log', message),
}