diff options
| author | Martin Bielik <martin.bielik@instea.sk> | 2024-12-07 11:21:29 +0100 |
|---|---|---|
| committer | Martin Bielik <martin.bielik@instea.sk> | 2024-12-07 11:21:34 +0100 |
| commit | 7c84f36cf9eb1e68eea861e0683a0d3a2a6faf3a (patch) | |
| tree | d0e470c45390e4f3194cbfb4895916415e9415d9 /py/utils.py | |
| parent | 67be1cc933099e8e648df960267a450e298e49d2 (diff) | |
| download | vim-ai-7c84f36cf9eb1e68eea861e0683a0d3a2a6faf3a.tar.gz | |
fix debug logging without arguments
Diffstat (limited to '')
| -rw-r--r-- | py/utils.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/py/utils.py b/py/utils.py index d3b7c8d..264c0c4 100644 --- a/py/utils.py +++ b/py/utils.py @@ -204,7 +204,8 @@ def printDebug(text, *args): if not is_debugging: return with open(debug_log_file, "a") as file: - file.write(f"[{datetime.datetime.now()}] " + text.format(*args) + "\n") + message = text.format(*args) if len(args) else text + file.write(f"[{datetime.datetime.now()}] " + message + "\n") OPENAI_RESP_DATA_PREFIX = 'data: ' OPENAI_RESP_DONE = '[DONE]' |