Skip to content

Commit cf7209b

Browse files
fix: stop output to stdout
1 parent 1195fd3 commit cf7209b

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

sebs/color.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ class Colors:
1212
class ColoredPrinter:
1313
@staticmethod
1414
def print(color, logging_instance, message):
15+
# Print the colored message by click
1516
timestamp = datetime.datetime.now().strftime("%H:%M:%S")
16-
logging_instance.info(message)
17-
click.echo(f"{color}{Colors.BOLD}[{timestamp}]{Colors.END} {message}")
17+
click.echo(f"{color}{Colors.BOLD}[{timestamp}]{Colors.END} {message}")
18+
19+
# Log the message but don't propagate to stdout
20+
logging_instance.propagate = False
21+
logging_instance.info(message)

0 commit comments

Comments
 (0)