mirror of
https://github.com/g0ldyy/comet.git
synced 2026-01-12 01:16:12 +01:00
refactor: update log level icon and enhance log parsing pattern
- Changed the database log level icon from "🗄️" to "💾" for better representation. - Modified the log parsing regex pattern to allow for more flexible matching of log levels.
This commit is contained in:
@@ -28,7 +28,7 @@ CUSTOM_LOG_LEVELS = {
|
||||
},
|
||||
"DATABASE": {
|
||||
"color": "#5aa5d9",
|
||||
"icon": "🗄️",
|
||||
"icon": "💾",
|
||||
"loguru_color": "<fg #5aa5d9>",
|
||||
"no": 32,
|
||||
},
|
||||
|
||||
@@ -100,7 +100,7 @@ class LoguruHandler:
|
||||
if message.strip():
|
||||
# Try to extract timestamp, level, module, function, and message
|
||||
# This is a simplified parser for loguru format
|
||||
pattern = r"(\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}) \| ([🌠👾👻🎬🔒🏭📰🕸️⚠️❌💀]?) ?(\w+) \| (\w+)\.(\w+) - (.+)"
|
||||
pattern = r"(\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}) \| (.*?) ?(\w+) \| (\w+)\.(\w+) - (.+)"
|
||||
match = re.match(pattern, message.strip())
|
||||
|
||||
if match:
|
||||
|
||||
Reference in New Issue
Block a user