-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathlog-config.toml
47 lines (39 loc) · 1.16 KB
/
log-config.toml
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
41
42
43
44
45
46
47
version = 1
[formatters]
[formatters.simple]
format = "%(levelname)s: %(name)s - %(asctime)s -> %(message)s"
datefmt = "%H:%M:%S"
[formatters.verbose]
format = "%(levelname)s: %(name)s - %(asctime)s -> %(message)s"
datefmt = "%d/%m/%Y (%H:%M:%S)"
[handlers]
[handlers.console]
class = "logging.StreamHandler"
formatter = "simple"
level = "INFO"
stream = "ext://sys.stdout"
[handlers.file]
class = "logging.handlers.RotatingFileHandler"
formatter = "verbose"
level = "DEBUG"
filename = "./logs/bot.log"
maxBytes = 100_000 # 100KB
backupCount = 3
[handlers.discord]
class = "logging.handlers.RotatingFileHandler"
formatter = "verbose"
level = "DEBUG"
filename = "./logs/discord.log"
maxBytes = 200_000 # 200KB
backupCount = 3
[loggers]
[loggers.root] # The default logger used for production
level = "WARNING"
handlers = ["file"]
[loggers.discord] # The logger used by Discord
level = "INFO"
handlers = ["discord"]
propagate = 0 # No propagation to the root logger
[loggers.development]
level = "DEBUG"
handlers = ["file", "console"]