Skip to content

Commit 9f61d96

Browse files
adityageshLiliDeng
authored andcommitted
TestCase Logger: Add Case id to logger name
Currently if same case is run multiple times, its not possible to distinguish the logs for each instance. Hence add case id to logger name.
1 parent f57aeb7 commit 9f61d96

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lisa/testsuite.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,7 @@ def __post_init__(self, *args: Any, **kwargs: Any) -> None:
9494
self._timer: Timer
9595

9696
self._environment_information: Dict[str, Any] = {}
97-
# parent_log = get_logger("suite", self.runtime_data.metadata.suite.name)
98-
self.log = get_logger("case", self.name)
97+
self.log = get_logger(f"case[{self.name}]", self.id_)
9998

10099
@property
101100
def is_queued(self) -> bool:

0 commit comments

Comments
 (0)