Not able to make streamlit work on AWS EC2 with Ubuntu 22

The sample app is deployed on AWS EC2 runnning Ubuntu 22.
There is no repo yet, I am running a sample file.
There is no error message. The application doesn’t seem to write to the log file as well.

python --version
Python 3.10.12

streamlit --version
Streamlit, version 1.29.0

Sample code 
# myFirstStreamlitApp.py

# import the library
import streamlit as stl
from streamlit.logger import get_logger
from pathlib import Path
from loguru import logger

logname = "file_1.log"
logger.add(logname)
logger.debug("This is a debug message")


logger = get_logger(__name__)
logger.info('Hello world')

# add title to your app
logger.debug("This is a debug message")

stl.title("Geeks for Geeks")
logger.info('Bye world')

logger.debug("After writing a debug message")

when I run the server I get the following 

streamlit run myFirstStreamlitApp.py --server.headless=true
2024-01-09 13:25:51.674 Did not auto detect external IP.
Please go to https://docs.streamlit.io/ for debugging hints.

  You can now view your Streamlit app in your browser.

  Network URL: http://10.211.58.17:8501

So it seems you’re using both loguru and streamlit logger in your code. It is generally good practice to use one logging system to avoid potential confusion or conflicts in logging behavior. Another thing to check is if the directory you’re writing logs to has the appropriate write permissions and that the path is correct.

Let me know if this helps.