Create standalone browser port of LTX Athena with authenticated native API transport
This commit is contained in:
commit
1333b0c36b
202 files changed
+63054
No files matched your search
@@ -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),
|
||||
}
|
||||
Reference in new issue
Block a user