File size: 544 Bytes
10d6a86
ae92cb7
 
10d6a86
ae92cb7
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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