diff --git a/pyproject.toml b/pyproject.toml index 60a5181..cb01758 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "tclogger" -version = "1.2.10.1" +version = "1.2.10.2" authors = [ { name="Hansimov" }, ] diff --git a/src/tclogger/__init__.py b/src/tclogger/__init__.py index c7cdc31..7981919 100644 --- a/src/tclogger/__init__.py +++ b/src/tclogger/__init__.py @@ -1,5 +1,5 @@ from .colors import colored, decolored -from .logs import TCLogger, logger, TCLogstr, logstr +from .logs import TCLogger, logger, TCLogstr, logstr, add_fillers from .times import get_now, get_now_ts, get_now_str, get_now_ts_str from .times import TIMEZONE, set_timezone, tcdatetime from .times import ts_to_str, str_to_ts, str_to_t diff --git a/src/tclogger/logs.py b/src/tclogger/logs.py index 74e4dc8..c362513 100644 --- a/src/tclogger/logs.py +++ b/src/tclogger/logs.py @@ -16,6 +16,9 @@ def add_fillers( fill_color: COLOR_TYPE = None, ): terminal_width = shutil.get_terminal_size().columns + if not text: + filled_str = colored(filler * terminal_width, color=fill_color) + return filled_str text = text.strip() if is_text_colored: text_width = len(decolored(text))