MCPcopy Index your code
hub / github.com/OpenBMB/ChatDev / LogLevel

Class LogLevel

entity/enums.py:13–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11
12
13class LogLevel(str, Enum):
14 DEBUG = "DEBUG"
15 INFO = "INFO"
16 WARNING = "WARNING"
17 ERROR = "ERROR"
18 CRITICAL = "CRITICAL"
19
20 __level_values = {
21 "DEBUG": 10,
22 "INFO": 20,
23 "WARNING": 30,
24 "ERROR": 40,
25 "CRITICAL": 50,
26 }
27
28 @property
29 def level(self) -> int:
30 return self.__level_values[self.value]
31
32 def __lt__(self, other):
33 if isinstance(other, LogLevel):
34 return self.level < other.level
35 return NotImplemented
36
37 def __le__(self, other):
38 if isinstance(other, LogLevel):
39 return self.level <= other.level
40 return NotImplemented
41
42 def __gt__(self, other):
43 if isinstance(other, LogLevel):
44 return self.level > other.level
45 return NotImplemented
46
47 def __ge__(self, other):
48 if isinstance(other, LogLevel):
49 return self.level >= other.level
50 return NotImplemented
51
52 def __eq__(self, other):
53 if isinstance(other, LogLevel):
54 return self.level == other.level
55 return super().__eq__(other)
56
57 def __hash__(self):
58 return super().__hash__()
59
60
61class EventType(str, Enum):

Callers 4

execute_batchFunction · 0.90
run_workflow_syncFunction · 0.90
run_workflowFunction · 0.90
from_dictMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected