mirror of
https://github.com/dw-0/kiauh.git
synced 2025-12-24 16:23:36 +05:00
refactor(kiauh): reword print_info to print_status and implement new print_info method
Signed-off-by: Dominik Willner <th33xitus@gmail.com>
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
# ======================================================================= #
|
||||
|
||||
from kiauh.utils.constants import (
|
||||
COLOR_WHITE,
|
||||
COLOR_GREEN,
|
||||
COLOR_YELLOW,
|
||||
COLOR_RED,
|
||||
@@ -34,6 +35,11 @@ class Logger:
|
||||
# log to kiauh.log
|
||||
pass
|
||||
|
||||
@staticmethod
|
||||
def print_info(msg, prefix=True, end="\n") -> None:
|
||||
message = f"[INFO] {msg}" if prefix else msg
|
||||
print(f"{COLOR_WHITE}{message}{RESET_FORMAT}", end=end)
|
||||
|
||||
@staticmethod
|
||||
def print_ok(msg, prefix=True, end="\n") -> None:
|
||||
message = f"[OK] {msg}" if prefix else msg
|
||||
@@ -50,6 +56,6 @@ class Logger:
|
||||
print(f"{COLOR_RED}{message}{RESET_FORMAT}", end=end)
|
||||
|
||||
@staticmethod
|
||||
def print_info(msg, prefix=True, end="\n") -> None:
|
||||
message = f"###### {msg}" if prefix else msg
|
||||
def print_status(msg, prefix=True, end="\n") -> None:
|
||||
message = f"\n###### {msg}" if prefix else msg
|
||||
print(f"{COLOR_MAGENTA}{message}{RESET_FORMAT}", end=end)
|
||||
|
||||
Reference in New Issue
Block a user