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 |