Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Completely rewrite logging system #646

Merged
merged 16 commits into from
Sep 1, 2023
1 change: 1 addition & 0 deletions .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ disable=C0103,
R0915,
R0916,
W0201,
W0231,
W0406,
W0613,
W0622,
Expand Down
11 changes: 11 additions & 0 deletions Documentation/Extension-howto.md
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,18 @@ response = await self.bot.http_call(
headers={"Content-Type": "application/json"},
)
```
## Logging

Logging can be done with the following:
```py
await self.bot.logger.send_log(
message="Message",
level=LogLevel.INFO,
context=LogContext(guild=ctx.guild, channel=ctx.channel),
channel=log_channel,
)
```
If applicable, add the content guild and channel

## Returning a message

Expand Down
Loading
Loading