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

[Question] How to suppress logging/progress printing? #17

Closed
svilupp opened this issue Oct 20, 2022 · 2 comments
Closed

[Question] How to suppress logging/progress printing? #17

svilupp opened this issue Oct 20, 2022 · 2 comments

Comments

@svilupp
Copy link

svilupp commented Oct 20, 2022

Thank you for the amazing package.

I was wondering if there is a way to suppress all the printed messages when producing a word cloud?

I have disabled logging but there still a lot of commands sent to stdin (eg, here), which show up anyway.

My ideal outcome would be that I get only the word cloud output and none of the following messages:

total words: 63. Unique words: 43. After filtration: 42.
The top 42 words are kept.
angles = -60:60
mask size: 300×400, content area: 346² (53²/word)
set fontsize ∈ [8.0, 300]
set density = 0.5
The word "insightful"(56.063448564744085) is too big. Set maxfontsize = 50.883237416299686.
The word "collaborative"(45.12210419223353) is too big. Set maxfontsize = 39.79636673099108.
⋯scale=59.76143046671968, density=0.5652075000000001 ↑
⋯scale=56.208504238858396, density=0.5291157500000001 ↑
⋯scale=53.16956950394639, density=0.4920475 ↓
fontsize ∈ [11.078697398031899, 39.79636673099108]
▸1. scale = 53.83598778968367
31 epochs
Total words: 14. Unique words: 10. After filtration: 9.
The top 9 words are kept.
angles = 0
mask size: 300×400, content area: 346² (115²/word)
set fontsize ∈ [8.0, 300]
set density = 0.5
⋯scale=129.09944487358058, density=0.640553 ↑
⋯scale=114.05959947564652, density=0.5048582500000001 ↑
fontsize ∈ [29.435917304955776, 115.67395628431842]
center the word "hazy"
gathering style: rt = 1, ellipse
▸1. scale = 113.48417855265
25 epochs

@guo-yong-zhi
Copy link
Owner

guo-yong-zhi commented Oct 21, 2022

https://docs.julialang.org/en/v1/base/io-network/#Base.redirect_stdio

I think you can redirect the stderr and stdout to devnull. Such as

wc = redirect_stdio(stdout=devnull, stderr=devnull) do
    wordcloud("get only the word cloud output") |> generate!
end

@guo-yong-zhi guo-yong-zhi pinned this issue Jan 15, 2023
@guo-yong-zhi
Copy link
Owner

try paintcloud.

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