-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.template.toml
More file actions
40 lines (38 loc) · 1.14 KB
/
config.template.toml
File metadata and controls
40 lines (38 loc) · 1.14 KB
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
[application]
name = "python-server-template"
mode = "debug" # debug prod
secret = "secret"
[application.time_zone]
name = "Asia/Shanghai"
[application.time_zone.fixed_zone]
name = "CST"
offset = 28800 # 8*3600
[application.logger]
version = 1
disable_existing_loggers = false
[application.logger.formatters.console]
class = "package.logger.formatter.ConsoleFormatter"
format = "%(asctime)s [ %(levelname)s ] %(name)s %(module)s %(pathname)s:%(lineno)d - %(funcName)s() \n%(message)s\n"
[application.logger.formatters.file]
class = "package.logger.formatter.Formatter"
format = "%(asctime)s [ %(levelname)s ] %(name)s %(module)s %(pathname)s:%(lineno)d - %(funcName)s() \n%(message)s\n"
[application.logger.handlers.console]
class = "logging.StreamHandler"
formatter = "console"
stream = "ext://sys.stdout"
[application.logger.handlers.file]
class = "package.logger.handler.TimedRotatingFileHandler"
formatter = "file"
filename = "log/app.log"
when = "D"
interval = 1
backupCount = 30
encoding = "utf-8"
delay = true
utc = false
[application.logger.root]
level = "DEBUG"
handlers = ["console", "file"]
[server.api]
address = "0.0.0.0"
port = 8080