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

Add new Discord Logger to README #256

Closed
MahdiBM opened this issue Jan 24, 2023 · 2 comments · Fixed by #257
Closed

Add new Discord Logger to README #256

MahdiBM opened this issue Jan 24, 2023 · 2 comments · Fixed by #257

Comments

@MahdiBM
Copy link
Contributor

MahdiBM commented Jan 24, 2023

Discord Logger

  • I've recently publicized the Discord-logger part of the private Discord stuff I'm using.

  • For what it's worth, I've personally moved to the publicized version of the logger since a few days ago, and everything has been going smoothly.

  • We're soon going to use the logger in Vapor community's Penny.

  • The logger also has a decent amount of tests.

  • It does take care of edge cases. For example, the logger:

    • Won't exceed Discord message-length limits. Will try to truncate if possible.
    • Won't exceed its Discord rate-limit when sending logs.
    • Will escape Discord-special characters before sending over to Discord.

    And much more ...

If you need to review the implementation, the logger-related parts of the library are present in the DiscordLogger target and there is a Discord-logger section available in the README.

@ktoso
Copy link
Member

ktoso commented Jan 24, 2023

Hm, it's not really a stand-alone logger package... but I guess for discord that would be perhaps weird to begin with.

I don't mind adding a link to it :) I see you're handling metadata providers nicely even 👍
Feel free to send in a PR

@MahdiBM
Copy link
Contributor Author

MahdiBM commented Jan 24, 2023

Yeah its not standalone, and I did think of that. That's why you can only depend on DiscordLogger instead of the whole DiscordBM.
It will still pull more stuff than a standalone logger package would, but I think it should be fine.

MahdiBM added a commit to MahdiBM/swift-log that referenced this issue Jan 24, 2023
Adds [DiscordBM](https://github.com/MahdiBM/DiscordBM/blob/discord-logger/README.md#discord-logger) to the logger list.

The description is:

> a Discord package containing a standalone [DiscordLogger library](https://github.com/MahdiBM/DiscordBM/blob/discord-logger/README.md#discord-logger)

Please do tell if you think "standalone" is misleading 🤔 I'm just trying to imply that users don't need to depend on the full package just for Discord-logging.

Resolves apple#256
ktoso added a commit that referenced this issue Feb 13, 2023
* Add DiscordBM/DiscordLogger to loggers list

Adds [DiscordBM](https://github.com/MahdiBM/DiscordBM/blob/discord-logger/README.md#discord-logger) to the logger list.

The description is:

> a Discord package containing a standalone [DiscordLogger library](https://github.com/MahdiBM/DiscordBM/blob/discord-logger/README.md#discord-logger)

Please do tell if you think "standalone" is misleading 🤔 I'm just trying to imply that users don't need to depend on the full package just for Discord-logging.

Resolves #256

* Update README.md

---------

Co-authored-by: Konrad `ktoso` Malawski <konrad_malawski@apple.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants