MRdotB
DiscoLog - Use Discord as a logging service and error tracking solution
Hello,
I’m excited to introduce DiscoLog, a logging service and error tracking solution for Elixir that uses a Discord server as its backend.
Setup
DiscoLog is easy to set up with a mix task that creates three channels for you:
#occurrences: A forum-style channel where errors are grouped by fingerprint and tagged, making it easy to track and manage them.#info: This channel pipes the output ofLogger.infodirectly to Discord, keeping you informed of general application events.#error: This channel pipes the output ofLogger.error. If the logger content is not an exception, it goes here; otherwise, it’s routed to#occurrences.
Additionally, DiscoLog have integration with Plug, Phoenix, LiveView, and Oban to provide extra context through :telemetry
Additionally, DiscoLog includes a :logger handler that converts exceptions into error occurrences, even for processes that lack specific integrations, such as GenServer crashes.
By using Discord, DiscoLog benefits from built-in notifications through the Discord app. Another advantage of the forum channel is the ability to prevent specific errors from triggering notifications repeatedly.
The Story Behind DiscoLog
DiscoLog is built upon the foundations of error_tracker, for the :logger handler, I borrows a lot of code from sentry-elixir and appsignal-elixir
The idea for DiscoLog emerged while experimenting with Discord’s Bot API. I realized that the Discord Forum Channel type could serve as a good solution for error tracking. The primary challenge was Discord’s limited message size, but I overcame this by utilizing message attachments to handle larger payloads.
Most Liked
MRdotB
v1.0.0 Released!
I’m excited to announce the release of DiscoLog v1.0.0! This update introduces two optional features:
- Presence Status – Allows your bot to appear online, representing your node in Discord.
- Go To Repo – Provides a direct link to GitHub (or a similar platform) to check the code where an error was triggered.
Additionally, it’s now possible to use the Discord client for ad hoc usage, though examples are not yet available.
New Demo: I’ve created a YouTube video showcasing the Presence Status and Go To Repo features
Huge thanks to @martosaur for implementing the Presence Status feature and refactoring the code to support ad hoc usage
MRdotB
I released disco_log v0.5.1:
- it fixes an issue that was crashing the logger handler because some elixir type can’t be serialized as is
Meanwhile I have been using it in production on multiples side projects.
I’m very satisfied with the error tracking ! ![]()
Next features on my list are:
- Go to code the idea is to be able to click the occurrence and to go to the relevant github code on the specfic branch / tag
- Active presence message to make the bot display some info about the node
dimitarvp
Wow that’s amazing, thanks for putting it together!
Popular in Announcing
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance










