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

Add some colors to the ERROR and WARNING labels #4414

Closed
ahmetb opened this Issue Feb 15, 2018 · 14 comments

Comments

Projects
None yet
4 participants
@ahmetb

ahmetb commented Feb 15, 2018

Would the maintainers be open to the idea of adding some colors to hugo server output?

Sometimes I keep refactoring content/themes and I don't realize I made an error some time ago. This is mostly because the console output from hugo server prints error messages without color, so these messages not stand out and alert me.

@bep

This comment has been minimized.

Member

bep commented Feb 15, 2018

The error messages tend to get pretty long, so I would not be a big fan of painting it all red ... We could consider making the "ERROR" label red.

@bep bep added the Proposal label Feb 15, 2018

@bep bep changed the title from [Proposal] hugo server: show errors in red to hugo server: show errors in red Feb 15, 2018

@ahmetb

This comment has been minimized.

ahmetb commented Feb 15, 2018

Yes that sounds quite ideal.

@kaushalmodi

This comment has been minimized.

Member

kaushalmodi commented Feb 15, 2018

consider making the "ERROR" label red.

and "WARN" labels in yellow?

@ahmetb

This comment has been minimized.

ahmetb commented Feb 15, 2018

Orange would be most preferable for warnings.

@kaushalmodi

This comment has been minimized.

Member

kaushalmodi commented Feb 15, 2018

ack related tip removed.

@bep bep changed the title from hugo server: show errors in red to Add some colors to the ERROR and WARNING labels Feb 15, 2018

@bep bep added Enhancement and removed Proposal labels Feb 15, 2018

@bep bep added this to the v0.37 milestone Feb 15, 2018

@bep

This comment has been minimized.

Member

bep commented Feb 15, 2018

OK, we make the labels only red (ERROR) and orange (WARNING).

@kaushalmodi

This comment has been minimized.

Member

kaushalmodi commented Feb 15, 2018

@bep Yes, I understand. I can always override that using ack.

I though prefer this touch:

image

That way, one does not need to hunt for the file name and line number.


Also, a slightly related tweak request..

You see that in the error:

Failed to add template "_default/headless-bundle-single.html" in path "/home/kmodi/stow/pub_dotfiles/emacs/dot-emacs.d/elisp/ox-hugo/test/site/layouts/_default/headless-bundle-single.html": template: /home/kmodi/stow/pub_dotfiles/emacs/dot-emacs.d/elisp/ox-hugo/test/site/layouts/_default/headless-bundle-single.html:39: function "c" not defined

the parts that I have emphasized are redundant.. those are the hugo site base dir (the one containing content/, etc.). I am running hugo server from that directory.. so having that information is useless.

So was wondering if the whole /home/kmodi/stow/pub_dotfiles/emacs/dot-emacs.d/elisp/ox-hugo/test/site can be replaced by something short like .

So the same error will look like:

Failed to add template "_default/headless-bundle-single.html" in path "/layouts/_default/headless-bundle-single.html": template: /layouts/_default/headless-bundle-single.html:39: function "c" not defined

And instead, the replaced information can be moved to:

Change detected, rebuilding site '/home/kmodi/stow/pub_dotfiles/emacs/dot-emacs.d/elisp/ox-hugo/test/site'

instead of the current:

Change detected, rebuilding site

@bep

This comment has been minimized.

Member

bep commented Feb 15, 2018

@kaushalmodi I think these ack tips belong in the tips section of the forum.

This is about the built-in CLI in Hugo.

@kaushalmodi

This comment has been minimized.

Member

kaushalmodi commented Feb 15, 2018

@bep I agree, I have removed that stuff.

But can you please comment on removing the redundant directory names from the file paths?

@kaushalmodi

This comment has been minimized.

Member

kaushalmodi commented Feb 15, 2018

Instead of seeing something like:

Change detected, rebuilding site
2018-02-15 14:10:50.055 -0500
Source changed "/home/kmodi/stow/pub_dotfiles/emacs/dot-emacs.d/elisp/ox-hugo/test/site/content/articles/article-1.md": REMOVE
Source changed "/home/kmodi/stow/pub_dotfiles/emacs/dot-emacs.d/elisp/ox-hugo/test/site/content/articles/article-2.md": REMOVE
Source changed "/home/kmodi/stow/pub_dotfiles/emacs/dot-emacs.d/elisp/ox-hugo/test/site/content/articles": REMOVE
Source changed "/home/kmodi/stow/pub_dotfiles/emacs/dot-emacs.d/elisp/ox-hugo/test/site/content/assignments": REMOVE
Source changed "/home/kmodi/stow/pub_dotfiles/emacs/dot-emacs.d/elisp/ox-hugo/test/site/content/posts/auto-set-lastmod.md": REMOVE
Source changed "/home/kmodi/stow/pub_dotfiles/emacs/dot-emacs.d/elisp/ox-hugo/test/site/content/posts/blackfriday-ext-enabling-disabling-toml.md": REMOVE
Source changed "/home/kmodi/stow/pub_dotfiles/emacs/dot-emacs.d/elisp/ox-hugo/test/site/content/posts/blackfriday-ext-enabling-disabling-yaml.md": REMOVE
Source changed "/home/kmodi/stow/pub_dotfiles/emacs/dot-emacs.d/elisp/ox-hugo/test/site/content/posts/blackfriday-ext-hardlinebreak-wrong-case-toml.md": REMOVE
Source changed "/home/kmodi/stow/pub_dotfiles/emacs/dot-emacs.d/elisp/ox-hugo/test/site/content/posts/blackfriday-fractions-false.md": REMOVE
Source changed "/home/kmodi/stow/pub_dotfiles/emacs/dot-emacs.d/elisp/ox-hugo/test/site/content/posts/blackfriday-fractions-true.md": REMOVE
Source changed "/home/kmodi/stow/pub_dotfiles/emacs/dot-emacs.d/elisp/ox-hugo/test/site/content/posts/cat-a-and-cat-b.md": REMOVE
Source changed "/home/kmodi/stow/pub_dotfiles/emacs/dot-emacs.d/elisp/ox-hugo/test/site/content/posts/cat-a-post-1.md": REMOVE
Source changed "/home/kmodi/stow/pub_dotfiles/emacs/dot-emacs.d/elisp/ox-hugo/test/site/content/posts/checklist.md": REMOVE

it will be nice to have:

Change detected, rebuilding site '/home/kmodi/stow/pub_dotfiles/emacs/dot-emacs.d/elisp/ox-hugo/test/site'
2018-02-15 14:10:50.055 -0500
Source changed "<ROOT>/content/articles/article-1.md": REMOVE
Source changed "<ROOT>/content/articles/article-2.md": REMOVE
Source changed "<ROOT>/content/articles": REMOVE
Source changed "<ROOT>/content/assignments": REMOVE
Source changed "<ROOT>/content/posts/auto-set-lastmod.md": REMOVE
Source changed "<ROOT>/content/posts/blackfriday-ext-enabling-disabling-toml.md": REMOVE
Source changed "<ROOT>/content/posts/blackfriday-ext-enabling-disabling-yaml.md": REMOVE
Source changed "<ROOT>/content/posts/blackfriday-ext-hardlinebreak-wrong-case-toml.md": REMOVE
Source changed "<ROOT>/content/posts/blackfriday-fractions-false.md": REMOVE
Source changed "<ROOT>/content/posts/blackfriday-fractions-true.md": REMOVE
Source changed "<ROOT>/content/posts/cat-a-and-cat-b.md": REMOVE
Source changed "<ROOT>/content/posts/cat-a-post-1.md": REMOVE
Source changed "<ROOT>/content/posts/checklist.md": REMOVE

Probably I should open another issue for this?

@bep

This comment has been minimized.

Member

bep commented Feb 15, 2018

But can you please comment on removing the redundant directory names from the file paths?

I'm not a big fan of issues starting out as some very specific, but drift into something only vaguely related.

It makes a practical issue (do this one specific thing) into something very muddy.

@bep bep modified the milestones: v0.37, v0.38 Feb 21, 2018

@mikhail73

This comment has been minimized.

mikhail73 commented Mar 12, 2018

It would be nice to have a beep about the error. In the old days, programs were able to squeak through the pc-speaker.

@kaushalmodi

This comment has been minimized.

Member

kaushalmodi commented Mar 12, 2018

It would be nice to have a beep about the error.

Not sure that folks at work will appreciate my machine beeping on Hugo errors. :)

@bep bep modified the milestones: v0.38, v0.39 Mar 20, 2018

@bep bep modified the milestones: v0.39, v0.40 Apr 9, 2018

@bep bep modified the milestones: v0.40, v0.41 Apr 20, 2018

@bep bep modified the milestones: v0.41, v0.42 May 4, 2018

@bep bep removed this from the v0.42 milestone Jun 5, 2018

@bep bep added this to the v0.46 milestone Jul 17, 2018

@bep bep modified the milestones: v0.46, v0.47, v0.48 Aug 3, 2018

@bep bep modified the milestones: v0.48, v0.49 Aug 22, 2018

@bep bep modified the milestones: v0.49, v0.50 Sep 13, 2018

@bep bep modified the milestones: v0.50, v0.51 Oct 6, 2018

@bep bep modified the milestones: v0.51, v0.50 Oct 24, 2018

@bep bep self-assigned this Oct 24, 2018

@bep bep modified the milestones: v0.50, v0.51 Oct 24, 2018

@bep

This comment has been minimized.

Member

bep commented Oct 24, 2018

This was a little trickier than I thought, and needs to hold a little. Also see #5344

@bep bep modified the milestones: v0.51, v0.50 Oct 24, 2018

bep added a commit to bep/hugo that referenced this issue Oct 28, 2018

bep added a commit to bep/hugo that referenced this issue Oct 28, 2018

bep added a commit to bep/hugo that referenced this issue Oct 28, 2018

@bep bep closed this in #5368 Oct 28, 2018

bep added a commit that referenced this issue Oct 28, 2018

bep added a commit that referenced this issue Oct 28, 2018

bep added a commit that referenced this issue Oct 28, 2018

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