Add the ability to mute/disable messages logged by the Logger
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- python
- Domain
- observability-sre
Research direction
Start in logger.py and trace how the repeated app_session messages are emitted, using the example ScriptRunnerEvent.ENQUEUE_FORWARD_MSG as the case to understand. Define what a global suppression filter should cover and verify that selected messages are muted without hiding unrelated logs; the issue names no test file, so add or locate coverage for this behavior.
Written by the indexing model from the issue text.
Description
Checklist
- I have searched the existing issues for similar feature requests.
- I added a descriptive title and summary to this issue.
Summary
My team has created an API in Streamlit that makes many streamlit calls with no actually user loading up a web browser. I get thousands of messages that show this:
2025-06-13 05:56:58.507:streamlit.runtime.app_session:app_session.py:525:DEBUG: Ignoring event from non-current ScriptRunner: ScriptRunnerEvent.ENQUEUE_FORWARD_MSG
2025-06-13 05:56:58.508:streamlit.runtime.app_session:app_session.py:525:DEBUG: Ignoring event from non-current ScriptRunner: ScriptRunnerEvent.ENQUEUE_FORWARD_MSG
My feature request is looking to add a function that applies a Global Filter to log message. Similar to how urllib3 has a disable warnings function.
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
Why?
I'm an unable to easily debug my streamlit application when I get over 2000+ messages repeating the same message. I'd like a way to add a filter so that if the user wants, they can disable certain messages from being logged.
How?
I'd like to introduce a function inside logger.py that adds a Global Filter to loggers.
I wanted to see if this was possible, and I have already created working code for this. Ideally, I'd like this feature to get added and would love feedback from Streamlit team if the team decided this is a good feature.
My current code would look like this when added to a streamlit python file.
from streamlit.logger import suppress_log_event
from streamlit.runtime.scriptrunner import ScriptRunnerEvent
suppress_log_event(ScriptRunnerEvent.ENQUEUE_FORWARD_MSG)
Additional Context
I'd like to volunteer for the solution for this issue.
- Dominant language
- Python
- Stars
- 45.8k
- Forks
- 4.4k
- Avg merge
- 21h 22m
- Merged PRs (30d)
- 316
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from streamlit/streamlit
-
area:backend area:network feature:embedding feature:runtime priority:P3 status:confirmed type:bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
area:frontend area:security feature:st.file_uploader status:unlikely type:enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
area:backend area:security feature:cache feature:cache-hash-func priority:P4 status:confirmed type:bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
area:mobile feature:st.camera_input papercut type:enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
area:ai type:enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
All issues in streamlit/streamlit
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
bancolombia/sentinel#23 ·
-
test md OpenCI
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·
-
bug client
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100