Skip to content
This repository was archived by the owner on Feb 20, 2026. It is now read-only.

cosmetic changes - #6

Merged
dmerejkowsky merged 1 commit into
masterfrom
dm/cosmetic
Sep 13, 2017
Merged

cosmetic changes#6
dmerejkowsky merged 1 commit into
masterfrom
dm/cosmetic

Conversation

@dmerejkowsky

Copy link
Copy Markdown
Collaborator

Replace ugly [ERROR] and [WARN ] prefixes by something nicer to read,
and remove [DEBUG] prefix.

This fixes using tsrc with the --verbose flag:

Old:
=> Updating manifest
[DEBUG]: /home/dmerej/tmp/tsrc/.tsrc/manifest $ git fetch --prune origin
[DEBUG]: /home/dmerej/tmp/tsrc/.tsrc/manifest $ git reset --hard @{u}
HEAD is now at e2f8457 add gitlab url

New:
=> Updating manifest
/home/dmerej/tmp/tsrc/.tsrc/manifest $ git fetch --prune origin
/home/dmerej/tmp/tsrc/.tsrc/manifest $ git reset --hard @{u}

Trivia:

This used to make sense back when ui.py was used as a logger
(a long time ago):

 [DEBUG] this is a debug message
 [INFO ] this is a info message
 [WARN ] this is a warning message
 [ERROR] this is an error message

Turned out we almost always something displayed to the screen between
ui.message() calls, so alignment does not matter much,
and the [INFO ] prefix was just noise.

So we removed the [INFO ] prefix from ui.info() but unintentionally left it in
ui.debug(), ui.warning(), and ui.error()

This change was already made in tsrc back in your-tools/tsrc@35b4b6d
but somehow was lost when ui.py was extracted to its own project.

Sorry!

Replace ugly [ERROR] and [WARN ] prefixes by something nicer to read,
and remove [DEBUG] prefix.

This fixes using `tsrc` with the `--verbose` flag:

Old:
     => Updating manifest
     [DEBUG]: /home/dmerej/tmp/tsrc/.tsrc/manifest $ git fetch --prune origin
     [DEBUG]: /home/dmerej/tmp/tsrc/.tsrc/manifest $ git reset --hard @{u}
     HEAD is now at e2f8457 add gitlab url

New:
     => Updating manifest
     /home/dmerej/tmp/tsrc/.tsrc/manifest $ git fetch --prune origin
     /home/dmerej/tmp/tsrc/.tsrc/manifest $ git reset --hard @{u}

Trivia:

This used to make sense back when ui.py was used as a logger
(a long time ago):

     [DEBUG] this is a debug message
     [INFO ] this is a info message
     [WARN ] this is a warning message
     [ERROR] this is an error message

Turned out we almost always something displayed to the screen between
ui.message() calls, so alignment does not matter much,
and the [INFO ] prefix was just noise.

So we removed the [INFO ] prefix from ui.info() but unintentionally left it in
ui.debug(), ui.warning(), and ui.error()

This change was already made in `tsrc` back in 35b4b6db5a05d2e1f3e09dc687dc4787905bf20c,
but somehow was lost when `ui.py` was extracted to its own project.

Sorry!
@dmerejkowsky
dmerejkowsky merged commit 80b30c0 into master Sep 13, 2017
@dmerejkowsky
dmerejkowsky deleted the dm/cosmetic branch September 13, 2017 14:24
dmerejkowsky added a commit that referenced this pull request May 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants