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

Long log lines overwrite themselves #142

Open
emmercm opened this issue Apr 30, 2023 · 1 comment
Open

Long log lines overwrite themselves #142

emmercm opened this issue Apr 30, 2023 · 1 comment

Comments

@emmercm
Copy link

emmercm commented Apr 30, 2023

Let's say I have a terminal width of 92. The following lines print fine (via cliProgress.MultiBar.log()):

INFO:  DATScanner: scanning DAT files
DEBUG: DATScanner: found 60 DAT files
DEBUG: DATScanner: enumerating DAT archives
DEBUG: DATScanner: downloading DATs from URLs
DEBUG: DATScanner: parsing 60 DAT files

But when I try to log something longer than 92 lines, it starts to overwrite itself.

Example 1:

Full text:

TRACE: DATScanner: /Users/cemmer/Downloads/Redump/Microsoft - Xbox - BIOS Datfile (7) (2010-09-13).dat: attempting to parse 1.8KiB of XML

How it renders:

09-13).dat: attempting to parse 1.8KiB of XMLdump/Microsoft - Xbox - BIOS Datfile (7) (2010-

Example 2:

Full text:

DEBUG: DATScanner: /Users/cemmer/Downloads/Redump/Microsoft - Xbox - BIOS Datfile (7) (2010-09-13).dat: failed to parse DAT XML: Non-whitespace before first tag., Line: 0, Column: 1, Char: c

How it renders:

har: c.dat: failed to parse DAT XML: Non-whitespace before first tag., Line: 0, Column: 1, C

The MultiBar settings I'm using are:

{
  barsize: 25,
  forceRedraw: true,
  emptyOnZero: true,
  hideCursor: true,
  noTTYOutput: true,
}

and changing the value of linewrap to true, false, and null all appear to do nothing.

I'm experiencing this problem with v3.11.1, v3.11.2, and v3.12.0 (I didn't test any versions before then).

@AndiDittrich
Copy link
Member

technically the modified tty settings need to reset/restored before/after logging appears. the basic logging implementation is a bit weak...

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

No branches or pull requests

2 participants