Skip to content

Commit

Permalink
Utils function was statically initializing log #172
Browse files Browse the repository at this point in the history
  • Loading branch information
renan-souza committed Dec 2, 2024
1 parent 6f734d0 commit 58793a5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/flowcept/commons/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@ def get_utc_minutes_ago(minutes_ago=1):
return rounded.timestamp()


def perf_log(func_name, t0: float, logger=FlowceptLogger()):
def perf_log(func_name, t0: float, logger=None):
"""Configure the performance log."""
if PERF_LOG:
_logger = logger or FlowceptLogger()
t1 = time()
logger.debug(f"[PERFEVAL][{func_name}]={t1 - t0}")
_logger.debug(f"[PERFEVAL][{func_name}]={t1 - t0}")
return t1
return None


def get_status_from_str(status_str: str) -> Status:
"""Get the status."""
# TODO: complete this utility function
Expand Down

0 comments on commit 58793a5

Please sign in to comment.