Logging module has added advantage of streaming to files which we can monitor from an webapp or sort. An example logger init is here ``` real_path = os.path.realpath(__file__) dir_path = os.path.dirname(real_path) LOGFILE = f"{dir_path}/test.log" logger = logging.getLogger('log_app') logger.setLevel(logging.DEBUG) fh = logging.FileHandler(LOGFILE) formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s') fh.setFormatter(formatter) logger.addHandler(fh) ``` We want to stream logs to a file. The end goal is to be able to monitor the logs from a url on the node. Like [here](https://amittallapragada.github.io/docker/fastapi/python/2020/12/23/server-side-events.html)
Logging module has added advantage of streaming to files which we can monitor from an webapp or sort.
An example logger init is here
We want to stream logs to a file. The end goal is to be able to monitor the logs from a url on the node. Like here