-
Notifications
You must be signed in to change notification settings - Fork 1
/
logging.yml
61 lines (61 loc) · 1.28 KB
/
logging.yml
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
version: 1
formatters:
bot:
format: "[%(asctime)s] [%(levelname)s] [%(botname)s] [%(name)s] - %(message)s"
discord:
format: "[%(asctime)s] [%(levelname)s] [%(name)s] - %(message)s"
commands:
format: |
[%(asctime)s] [%(botname)s] [%(username)s (%(userid)s) in %(guild)s (%(guildid)s)]
[Command: %(command)s] [Message: %(full)s]
handlers:
bot_console:
class: logging.StreamHandler
formatter: bot
level: INFO
stream: ext://sys.stdout
discord_console:
class: logging.StreamHandler
formatter: discord
level: INFO
stream: ext://sys.stdout
bot_file:
class: logging.FileHandler
formatter: bot
level: INFO
filename: app.log
discord_file:
class: logging.FileHandler
formatter: discord
level: INFO
filename: app.log
commands_file:
class: logging.FileHandler
formatter: commands
level: INFO
filename: commands.log
loggers:
__main__:
level: INFO
handlers:
- bot_console
- bot_file
bot:
level: INFO
handlers:
- bot_console
- bot_file
commands:
level: INFO
handlers:
- commands_file
discord:
level: INFO
handlers:
- discord_console
- discord_file
# root:
# level: INFO
# handlers:
# - bot_console
# - bot_file