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

[REQUEST] Do not truncate paths and URLs in logger #190

Closed
aklajnert opened this issue Jul 29, 2020 · 9 comments
Closed

[REQUEST] Do not truncate paths and URLs in logger #190

aklajnert opened this issue Jul 29, 2020 · 9 comments

Comments

@aklajnert
Copy link
Contributor

Thank you for a wonderful project, it's very useful and makes my work more pleasant.

I'm using rich as a logger handler, and while in general it works great, that I don't like the fact that depending on terminal width it truncates some URL's, paths, and some other things that I can't identify.

See screenshot below:
image

Is it already possible to disable this behavior? I can't find anything about it in the documentation.

@willmcgugan
Copy link
Collaborator

Yes, that should probably be changed to overflow=fold, but it's not currently exposed.

I'm puzzled as to why the URL doesn't wrap to the next line. Here's what happened when I tested it:

Screen Shot 2020-07-29 at 10 46 07

What version of Rich do you have, and how have you configured logging?

@aklajnert
Copy link
Contributor Author

@willmcgugan I just did update to the newest version, and the URL's are not truncated here.

Is the mentioned overflow=fold enabled in your screenshot? I see the path is still truncated.

@willmcgugan
Copy link
Collaborator

That was 4.2.0 in the screenshot. I'll set the overflow to fold in the next update.

@aklajnert
Copy link
Contributor Author

Maybe it would make sense to allow changing it as an argument since this would be a breaking change and some people may not like it.

@willmcgugan
Copy link
Collaborator

Configuration is usually the answer to these things, but I think in this case "fold" is clearly better. It doesn't break anything in the sense that no project will be rendered non-functional, it's more of a visual thing.

Totally willing to revisit it if anyone does object...

@aklajnert
Copy link
Contributor Author

Got it, any estimates when can we expect this change? Do you need any help with that?

@willmcgugan
Copy link
Collaborator

Update coming tonight or tomorrow...

@willmcgugan
Copy link
Collaborator

Try v4.2.1

@aklajnert
Copy link
Contributor Author

Everything is great now, thank you!

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

No branches or pull requests

2 participants