Commit 38648c81 by arjun.b

logging file added

parent e86164af
import uvicorn as uvicorn import uvicorn as uvicorn
from scripts.config.application_config import server_path, port_no from scripts.config.application_config import server_path, port_no
from scripts.logging.logging import logger
if __name__ == "__main__": if __name__ == "__main__":
try: try:
uvicorn.run(server_path, port=int(port_no), reload=True) uvicorn.run(server_path, port=int(port_no), reload=True)
except Exception as e: except Exception as e:
print(str(e)) logger.error(f"could not run server: {e}")
...@@ -17,5 +17,4 @@ def subscribe(): ...@@ -17,5 +17,4 @@ def subscribe():
subscriber.subscribe() subscriber.subscribe()
return {"data", "ready for subscribe the topic"} return {"data", "ready for subscribe the topic"}
except Exception as e: except Exception as e:
logger.error("cant subscribe the topic") logger.error(f"could not subscribe the topic: {e}")
print(e)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment