Skip to content

Commit

Permalink
Print MultiQC intro without Rich
Browse files Browse the repository at this point in the history
  • Loading branch information
vladsavelyev committed Apr 16, 2024
1 parent fd1b8fc commit fdf196a
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions multiqc/utils/log.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,6 @@ def init_log(logger, quiet: bool, verbose: int, no_ansi: bool = False):
force_terminal=util_functions.force_term_colors(),
color_system=None if no_ansi else "auto",
)
if not is_running_in_notebook():
rich_console.print(
f"\n [dark_orange]///[/] [bold][link=https://multiqc.info]MultiQC[/link][/] :mag: [dim]| v{config.version}\n"
)

# File for logging
global log_tmp_dir, log_tmp_fn
Expand Down Expand Up @@ -108,6 +104,22 @@ def init_log(logger, quiet: bool, verbose: int, no_ansi: bool = False):
file_handler.setFormatter(logging.Formatter(debug_template))
logger.addHandler(file_handler)

if not config.no_ansi:
BOLD = "\033[1m"
DIM = "\033[2m"
DARK_ORANGE = "\033[38;5;208m" # ANSI code for dark orange color
RESET = "\033[0m"
else:
BOLD = ""
DIM = ""
DARK_ORANGE = ""
RESET = ""
intro = f"{DARK_ORANGE}///{RESET} {BOLD}https://multiqc.info{RESET} 🔍 {DIM}| v{config.version}"
if is_running_in_notebook():
print(intro)
else:
print(f"\n {intro}\n")


def move_tmp_log():
"""Move the temporary log file to the MultiQC data directory
Expand Down

0 comments on commit fdf196a

Please sign in to comment.