-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathserver_conf.py
26 lines (25 loc) · 936 Bytes
/
server_conf.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import logging
from dash import Dash
# create a console and file logger
logger = logging.getLogger(__name__)
logger.setLevel(logging.DEBUG)
formatter = logging.Formatter("%(message)s")#"%(asctime)s - %(name)s - %(levelname)s - %(message)s"
# create a file handler
file_handler = logging.FileHandler("app.log")
file_handler.setLevel(logging.DEBUG)
file_handler.setFormatter(formatter)
# create a stream handler
stream_handler = logging.StreamHandler()
stream_handler.setLevel(logging.DEBUG)
stream_handler.setFormatter(formatter)
# add the handlers to the logger
logger.addHandler(file_handler)
logger.addHandler(stream_handler)
# call the ability to add external scripts
external_scripts = [
# add the tailwind cdn url hosting the files with the utility classes
{"src": "https://cdn.tailwindcss.com"}
]
app = Dash(
__name__, external_scripts=external_scripts, suppress_callback_exceptions=True, assets_folder="../assets"
)