Skip to content

Commit 40705be

Browse files
committed
add trace method to loggingdescriptor
1 parent c95c50d commit 40705be

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

robotcode/utils/logging.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,16 @@ def error(
219219
) -> None:
220220
self.log(logging.ERROR, msg, condition, *args, stacklevel=stacklevel, **kwargs)
221221

222+
def trace(
223+
self,
224+
msg: Union[str, Callable[[], str]],
225+
condition: Optional[Callable[[], bool]] = None,
226+
*args: Any,
227+
stacklevel: int = 3,
228+
**kwargs: Any,
229+
) -> None:
230+
self.log(TRACE, msg, condition, *args, stacklevel=stacklevel, **kwargs)
231+
222232
def exception(
223233
self,
224234
msg: Union[BaseException, str, Callable[[], Union[BaseException, str]]],

0 commit comments

Comments
 (0)