When I launch my Streamlit application using the command "streamlit run streamlit_test.py", I noticed that the logs are printed multiple times. However, when I refresh the browser, the logs are only printed once. Here is my code:
import streamlit as st
from streamlit.logger import get_logger
import logging
LOGGER = get_logger(__name__)
LOGGER.setLevel(logging.DEBUG)
LOGGER.debug(f'start of streamlit_test')
st.write("hello")
LOGGER.debug(f'end of streamlit_test')
When I start Streamlit, the logs in my code are printed multiple times. Here are the logs:
2023-06-14 22:09:19.993 start of streamlit_test
2023-06-14 22:09:19.998 start of streamlit_test
2023-06-14 22:09:20.008 end of streamlit_test
2023-06-14 22:09:20.285 end of streamlit_test
2023-06-14 22:09:20.831 start of streamlit_test
2023-06-14 22:09:20.833 end of streamlit_test
2023-06-14 22:09:23.266 start of streamlit_test
2023-06-14 22:09:23.268 end of streamlit_test
2023-06-14 22:09:23.752 start of streamlit_test
2023-06-14 22:09:23.754 end of streamlit_test
When I refresh the browser, the logs are only printed once.Here are the logs:
2023-06-14 22:30:08.388 start of streamlit_test
2023-06-14 22:30:08.391 end of streamlit_test
I would like to know the reason behind this. Can someone help me? I would greatly appreciate it.
streamlit==1.24.0
. – Lashelllasher