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

Missing linebreak in logging below progress bar #1723

Closed
jovyntls opened this issue Jan 18, 2022 · 4 comments · Fixed by #1819 or #1907
Closed

Missing linebreak in logging below progress bar #1723

jovyntls opened this issue Jan 18, 2022 · 4 comments · Fixed by #1819 or #1907

Comments

@jovyntls
Copy link
Contributor

jovyntls commented Jan 18, 2022

Tell us about your environment
MacOS Monterey

  • MarkBind Version: v3.1.0

What did you do? Please include the actual source code causing the issue.
Run markbind serve on a site with logger warnings

What did you expect to happen?
The warning log message should be on a new line below the progress bar.

What actually happened? Please include the actual, raw output.
There is a missing line break between these two lines:
Screenshot 2022-01-18 at 3 24 58 PM

@ryoarmanda
Copy link
Contributor

ryoarmanda commented Jan 18, 2022

Ah, this is something that I have noticed for a while. Further research may be needed, but for a preliminary thought, I think this might be because of the way this kind of "updatable" progress bar works. The common trick of progress bars like these are to use the carriage return character (\r) to overwrite the displayed bar. The incoming logs messed up with the flow a little bit and instead of the old bar being rewritten, it is still there, continued with the logs, and then the new bar is printed below it, which is exactly the image above.

It kind of creates a clutter, and this is essentially what the first item on #1633 is trying to tackle. Feel free to research any ways to create or find a different progress bar display mechanism. I mentioned the apt-get's progress bar there (the one you usually use to install packages in Linux), I remember that even with incoming log outputs, the progress bar on that program stays intact and don't clutter the console, not sure how they did it.

@jovyntls
Copy link
Contributor Author

Hi @ryoarmanda, thanks for your explanations (it was helpful 😄 )! I'll take some time to look into this and see what can be done.

@tlylt
Copy link
Contributor

tlylt commented Feb 8, 2022

Happen to investigate into the progress bar in another PR so leaving some notes here:

  • It seems like when there is a warning that disturbs the progress bar, it recreates another one. So on top of the linebreak that is missing, the progress bar is unnecessarily rendered twice(somehow, not exactly sure why)
    image

  • If without any warning, it should and will only render one progress bar.

  • The bar.interrupt() method might be a possible solution for this issue. see Is there a way to mute the bar? visionmedia/node-progress#188 (comment)
    Or I am guessing we could possibly find an alternative as the node-progress module that we are using is no longer actively maintained (last update 2018)

@tlylt
Copy link
Contributor

tlylt commented Apr 16, 2022

Reopening because while broken link reporting is shifted to the end of page generation(hence resolving the missing linebreak for those logs), other types of warnings such as builtwarn: modal has a header slot, 'header' attribute has no effect. still occur without linebreak. E.g:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants