User avatar
thagrol
Posts: 10941
Joined: Fri Jan 13, 2012 4:41 pm
Location: Darkest Somerset, UK

Thonny log spamming terminal

Sat Dec 02, 2023 6:11 pm

Now, I know I'm in the minority here in that my Pi are headless and booting to the command line with GUI applications run over X11 forwarding but I very much doubt that is a factor here. Running thonny from the desltop menu will almostcertainly be doing the same but it will be hidden from the user.

When run from the command line Thonny appears to be generating a lot of spam that appears to be coming from python's logging module and going to stdout.

As there is nothing in thonny's options related to this that I coudl find, does anyone know a method short of editing thony's code to disable or change the logging level? (Why short of editing the code? I'd expect manual code changes to break or be broken the next time there's an update.)

My current workaround if to alias thonny to thonny >/dev/null but that throws away everything.

Yes, I'm aware that I could use a different editor but I only use thonny for micropython on pico and I'd rather contiune to do so as it's A. the editor in the docs, B. is what I suspect most folks are using, and C. keeps micropython dev separate from python dev (I use geany for that).
Knowledge, skills, & experience have value. If you expect to profit from someone's you should expect to pay for them.

All advice given is based on my experience. it worked for me, it may not work for you.
Need help? https://github.com/thagrol/Guides

terribleted
Posts: 1569
Joined: Tue Oct 06, 2020 8:07 pm

Re: Thonny log spamming terminal

Sat Dec 02, 2023 8:45 pm

have you seen this?
https://github.com/thonny/thonny/wiki/User-action-logs
i don't use it, but i was surprised to find it on Github. !

..update: well, now i guess i have to get serious about python!
The only people that don't make mistakes are people that don't do anything.

User avatar
thagrol
Posts: 10941
Joined: Fri Jan 13, 2012 4:41 pm
Location: Darkest Somerset, UK

Re: Thonny log spamming terminal

Sun Dec 03, 2023 12:06 am

terribleted wrote:
Sat Dec 02, 2023 8:45 pm
have you seen this?
https://github.com/thonny/thonny/wiki/User-action-logs
i don't use it, but i was surprised to find it on Github. !
I hadn't seen that page but the related setting in Tools > Options is off.

And, what a surprise, I've had to reboot that Pi (and the windows box running the X server) and it's no longer happenning. :x
Knowledge, skills, & experience have value. If you expect to profit from someone's you should expect to pay for them.

All advice given is based on my experience. it worked for me, it may not work for you.
Need help? https://github.com/thagrol/Guides

User avatar
thagrol
Posts: 10941
Joined: Fri Jan 13, 2012 4:41 pm
Location: Darkest Somerset, UK

Re: Thonny log spamming terminal

Sun Dec 03, 2023 2:12 pm

thagrol wrote:
Sun Dec 03, 2023 12:06 am
And, what a surprise, I've had to reboot that Pi (and the windows box running the X server) and it's no longer happenning. :x
And that was wrong. I forgot I'd added that alias to my ~/.bash_aliases. Thonny is still spamming stdout.
Knowledge, skills, & experience have value. If you expect to profit from someone's you should expect to pay for them.

All advice given is based on my experience. it worked for me, it may not work for you.
Need help? https://github.com/thagrol/Guides

terribleted
Posts: 1569
Joined: Tue Oct 06, 2020 8:07 pm

Re: Thonny log spamming terminal

Sun Dec 03, 2023 2:48 pm

in that github repository... see thonny/.pylintrc

there is a section called "messages control" and a reference to
# Enable the message, report, category or checker with the given id(s). You can
# either give multiple identifier separated by comma (,) or put this option
# multiple time. See also the "--disable" option for examples.

(i'm grasping here....another option is to send the developer a query.)
The only people that don't make mistakes are people that don't do anything.

User avatar
thagrol
Posts: 10941
Joined: Fri Jan 13, 2012 4:41 pm
Location: Darkest Somerset, UK

Re: Thonny log spamming terminal

Sun Dec 03, 2023 2:55 pm

terribleted wrote:
Sun Dec 03, 2023 2:48 pm
in that github repository... see thonny/.pylintrc

there is a section called "messages control" and a reference to
# Enable the message, report, category or checker with the given id(s). You can
# either give multiple identifier separated by comma (,) or put this option
# multiple time. See also the "--disable" option for examples.

(i'm grasping here....another option is to send the developer a query.)

Yeah, that's probabbly the best way forward. Thanks.
Knowledge, skills, & experience have value. If you expect to profit from someone's you should expect to pay for them.

All advice given is based on my experience. it worked for me, it may not work for you.
Need help? https://github.com/thagrol/Guides

Return to “Advanced users”