feat:移除了弹窗,服务器添加sls

This commit is contained in:
2026-09-08 22:39:45 +08:00
commit 6a295f9a7a
4082 changed files with 1322534 additions and 0 deletions

View File

@ -0,0 +1,14 @@
import type { LogLevel } from '../types'
const ERROR_TRIGGERS = ['/ERROR', 'Exception:', ':?]', 'Error', '[thread', '\tat']
export function detectLogLevel(lineText: string): LogLevel | null {
if (lineText.includes('/INFO') || lineText.includes('[System] [CHAT]')) return 'info'
if (lineText.includes('/WARN')) return 'warn'
if (lineText.includes('/DEBUG')) return 'debug'
if (lineText.includes('/TRACE')) return 'trace'
for (const trigger of ERROR_TRIGGERS) {
if (lineText.includes(trigger)) return 'error'
}
return null
}