-
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
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 color to the relevant filenames in terminal log #5345
Conversation
Unfortunately these escape codes currently also creeps into the log file (if enabled): WARN 2018/10/24 11:35:22 Content dir "/Users/bep/sites/hugotest/content_s/s1" already processed; skipped to avoid infinite recursion.
ERROR 2018/10/24 11:35:22 ESC[1;36m"/Users/bep/sites/hugotest/layouts/_default/baseof.html:16:75"ESC[0m: execute of template failed: template: _default/list.html:16:75: executing "_default/list.html" at <.Sites.Title>: can't evaluate field Title in type hugolib.SiteInfos
ERROR 2018/10/24 11:35:22 ESC[1;36m"/Users/bep/sites/hugotest/layouts/_default/baseof.html:16:75"ESC[0m: execute of template failed: template: _default/list.html:16:75: executing "_default/list.html" at <.Sites.Title>: can't evaluate field Title in type hugolib.SiteInfos
ERROR 2018/10/24 11:35:22 ESC[1;36m"/Users/bep/sites/hugotest/layouts/_default/baseof.html:16:75"ESC[0m: execute of template failed: template: _default/list.html:16:75: executing "_default/list.html" at <.Sites.Title>: can't evaluate field Title in type hugolib.SiteInfos
ERROR 2018/10/24 11:35:22 ESC[1;36m"/Users/bep/sites/hugotest/layouts/_default/baseof.html:16:75"ESC[0m: execute of template failed: template: _default/single.html:16:75: executing "_default/single.html" at <.Sites.Title>: can't evaluate field Title in type hugolib.SiteInfos I guess we can live with that, but it would be cool if we could avoid it ... |
OK, I have added a "ansi cleaner" to the log handler that should do the trick for my last comment. |
I haven't built with this PR yet. But looking at the screenshot, it looks like the reds and yellows are missing for errors and warnings. Like the blue Notice method, can you add red (white text in red background) and yellow (yellow text in default background) variants to wrap the "ERROR" and "WARN" strings? |
Nevermind, I got confused with #4414. |
Yes, as I pointed out in that thread, that one need some more investigation. |
I'll merge this now ... I people disagree about the color, we can put it up for a vote or something. I like this. |
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Fixes #5344