Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Color-coded output #65

Closed
mcopik opened this issue Jan 4, 2021 · 2 comments
Closed

Color-coded output #65

mcopik opened this issue Jan 4, 2021 · 2 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@mcopik
Copy link
Collaborator

mcopik commented Jan 4, 2021

With the switch to click, we can now provide better output:

class Colors:
    SUCCESS = "\033[92m"
    STATUS = "\033[94m"
    WARNING = "\033[93m"
    ERROR = "\033[91m"
    BOLD = "\033[1m"
    END = "\033[0m"


def _print(color, message):
    timestamp = datetime.datetime.now().strftime("%H:%M:%S")
    click.echo(f"{color}{Colors.BOLD}[{timestamp}]{Colors.END} {message}")
@mcopik mcopik added the enhancement New feature or request label Jan 4, 2021
@mcopik mcopik added the good first issue Good for newcomers label Feb 16, 2023
@lawrence910426
Copy link
Contributor

Hello, @mcopik

May I work on this issue? Thank you so much :D

@mcopik
Copy link
Collaborator Author

mcopik commented Mar 15, 2023

@lawrence910426 Go ahead! :-)

mcopik pushed a commit that referenced this issue Mar 29, 2023
* feat: implement color wrapper

* feat: replace logging with colored printer

* fix: output to logging

* fix: stop output to stdout

* Revert "fix: stop output to stdout"

This reverts commit cf7209b.

* fix: revert intercepting on sebs.py

* feat: move color to utils.py

* feat: miliseconds

* feat: intercept @ logging base

* fix: rename vars to avoid conflict

* fix: remove legacy output

* fix: legacy imports

* fix: wrong return type

* fix: mypy precedence

* fix: mypy precedence

* fix: change precedence of colored printer

* fix: define return signature

* feat: colored wrapper

* fix: update to single handler

* fix: propagate only if file input exists

* feat: metadata before main message
@mcopik mcopik closed this as completed Jul 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants