sentry-ruby
sentry-ruby copied to clipboard
implement stdlib logger support
Description
Describe your changes: This is a fun way of adding integration for stdlib Logger so that any usage of any logger instance would result in sending logs to Sentry too. issue
Sample Config
require "sentry-ruby"
# Initialize Sentry with experimental logging feature enabled
Sentry.init do |config|
config.dsn = "YOUR_SENTRY_DSN"
config.environment = "development"
# Set this to enable structured logging via Sentry.logger
config.enable_logs = true
# set this to send any instance of stdlib logger to sentry
config.send_stdlib_logs = true
end
logger = Logger.new(STDOUT)
logger.info('send_stdlib_log') { "send_stdlib_log_enable_logs: Testing 789..." }
logger.warn("ruby logger warn - - 9")