MCPcopy Create free account
hub / github.com/Yasoz/DiffTraj / log_function

Method log_function

utils/logger.py:108–120  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

106 self.critical = self.__logger.critical
107
108 def log_function(self):
109 def wrapper(func):
110 def func_wrapper(*args, **kwargs):
111 self.__logger.info(
112 f"calling <{func.__name__}>\n\t args: {args}\n\tkwargs: {kwargs}"
113 )
114 out = func(*args, **kwargs)
115 self.__logger.info(f"exiting <{func.__name__}>")
116 return out
117
118 return func_wrapper
119
120 return wrapper
121
122 def setLevel(self, level: Union[str, int]) -> None:
123 if isinstance(level, int):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected