mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
comments
This commit is contained in:
@@ -2,20 +2,26 @@ from enum import Enum, auto
|
||||
|
||||
|
||||
class LogGroup(Enum):
|
||||
UNDEFINED = 0
|
||||
EVENT = auto()
|
||||
DEBUG = auto()
|
||||
INFO = auto()
|
||||
WARNING = auto()
|
||||
ERROR = auto()
|
||||
PRINT = auto()
|
||||
"""A log group is a classification of the log message (*not* a level)."""
|
||||
|
||||
UNDEFINED = 0 # Mainly for testing
|
||||
EVENT = 1
|
||||
DEBUG = 2
|
||||
INFO = 3
|
||||
WARNING = 4
|
||||
ERROR = 5
|
||||
PRINT = 6
|
||||
|
||||
|
||||
class LogVerbosity(Enum):
|
||||
"""Tags log messages as being verbose and potentially excluded from output."""
|
||||
|
||||
NORMAL = 0
|
||||
HIGH = 1
|
||||
|
||||
|
||||
class LogSeverity(Enum):
|
||||
"""Tags log messages as being more severe."""
|
||||
|
||||
NORMAL = 0
|
||||
CRITICAL = 1
|
||||
|
||||
@@ -92,7 +92,7 @@ class DevConsoleLog:
|
||||
time = local_time.time()
|
||||
message = Text(
|
||||
f":warning-emoji: [{time}] {group}"
|
||||
if self.severity
|
||||
if self.severity > 0
|
||||
else f"[{time}] {group}"
|
||||
)
|
||||
message.stylize("dim")
|
||||
|
||||
Reference in New Issue
Block a user