diff options
| author | Pinapelz <yukais@pinapelz.com> | 2024-10-04 11:16:17 -0700 |
|---|---|---|
| committer | Pinapelz <yukais@pinapelz.com> | 2024-10-04 11:16:17 -0700 |
| commit | afbeb5ff8655a192192c9607ee1ae6ed7be78b0c (patch) | |
| tree | 0a8cc37e97a0d6558d79362aaae1ad06551d65f1 /decorators.py | |
| parent | b9fe59a2bb8c50c09224991ca3a29ce754e80cda (diff) | |
improve output logging
- logs to file
Diffstat (limited to 'decorators.py')
| -rw-r--r-- | decorators.py | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/decorators.py b/decorators.py deleted file mode 100644 index bc0b420..0000000 --- a/decorators.py +++ /dev/null @@ -1,16 +0,0 @@ -import time - - -def log(message: str): - def decorator(func): - def wrapper(*args, **kwargs): - print("TASK: " + message) - start = time.time() - result = func(*args, **kwargs) - end = time.time() - print(f"COMPLETE: {message} {round(end - start, 3)} seconds") - return result - - return wrapper - - return decorator |
