Skip to content

[scripts] Just add some color in the logs to highlight errors#100

Open
epernod wants to merge 2 commits intosofa-framework:masterfrom
epernod:some_color
Open

[scripts] Just add some color in the logs to highlight errors#100
epernod wants to merge 2 commits intosofa-framework:masterfrom
epernod:some_color

Conversation

@epernod
Copy link
Contributor

@epernod epernod commented Feb 11, 2026

harmless PR but need to double check because I got a lot of conflict from my dev branch from where I cherry pick that

@bakpaul
Copy link
Contributor

bakpaul commented Feb 13, 2026

Always better with colors !!
You could also create a utilitary functions:

def writeError(message):
    return f"{TermColor.RED}{message}{TermColor.RESET}"
    
def writeWarning(message):
    return f"{TermColor.YELLOW}{message}{TermColor.RESET}"
    
def writeSuccess(message):
    return f"{TermColor.GREEN}{message}{TermColor.RESET}"

Then you can simply write

print(f"### {writeError("[Failed]")} {self.file_scene_path}")

This would make the code clearer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants