Class: Dislogger::Notifiers::DiscordNotifier
- Inherits:
-
BaseNotifier
- Object
- BaseNotifier
- Dislogger::Notifiers::DiscordNotifier
- Defined in:
- lib/dislogger/notifiers/discord_notifier.rb
Instance Method Summary collapse
Methods inherited from BaseNotifier
Constructor Details
This class inherits a constructor from Dislogger::Notifiers::BaseNotifier
Instance Method Details
#notify(message:, status:, backtrace: nil) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/dislogger/notifiers/discord_notifier.rb', line 6 def notify(message:, status:, backtrace: nil) return false unless enabled? && @config.discord_webhook_url.present? log_info("Attempting to send Discord notification") = (, status, backtrace) send_notification() rescue StandardError => e log_error("Discord notification failed: #{e.}") log_error(e.backtrace.join("\n")) if e.backtrace false end |