mr / app /engine /logger.py
JPBianchi's picture
endpoint only, no UI
ae92cb7
raw
history blame contribute delete
544 Bytes
import os, logging
import reflex as rx
logger = logging.getLogger("uvicorn").info
# logger = lambda x: rx.console_log(x)
# let's use reflex's logger, but doesn't show in the console??
# environment = os.getenv("ENVIRONMENT", "dev")
# if environment == "dev":
# logger = logging.getLogger("uvicorn").info
# else:
# logger = lambda x: print(x)
# # we should log also in production TODO
# # check how it works on HuggingFace, if possible
# # because we don't have access to the container's file system unless in pro mode