diff options
author | Trygve Aaberge <trygveaa@gmail.com> | 2023-01-29 00:19:17 +0100 |
---|---|---|
committer | Trygve Aaberge <trygveaa@gmail.com> | 2024-02-18 11:32:53 +0100 |
commit | 8f3a5bdc1ec969ae069451ddf8c68ade002782bc (patch) | |
tree | 493fec3bbda8aa154a91854f443c0711960f5089 /slack/log.py | |
parent | b8025c704e280551035f8c0ba60d581d78ee953a (diff) | |
download | wee-slack-8f3a5bdc1ec969ae069451ddf8c68ade002782bc.tar.gz |
Improve error printing
Diffstat (limited to 'slack/log.py')
-rw-r--r-- | slack/log.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/slack/log.py b/slack/log.py index 552727d..e33b744 100644 --- a/slack/log.py +++ b/slack/log.py @@ -23,4 +23,5 @@ def print_error(message: str): def log(level: LogLevel, message: str): if level >= LogLevel.INFO: - print(level, message) + prefix = weechat.prefix("error") if level >= LogLevel.ERROR else "\t" + weechat.prnt("", f"{prefix}{shared.SCRIPT_NAME} {level.name}: {message}") |